Bug 602644

Summary: GDB fails to start on readonly filesystem
Product: [Fedora] Fedora Reporter: Piotr Kolaczek <pk>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: jan.kratochvil, pmuldoon, swagiaal, tromey
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:75ee644048798eca0bcc2bd9936188ec926f2bdc
Fixed In Version: gdb-7.1-32.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-06 21:03:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace none

Description Piotr Kolaczek 2010-06-10 11:49:41 UTC
abrt 1.1.1 detected a crash.

architecture: i686
Attached file: backtrace
cmdline: gdb -batch -ex 'set debug-file-directory /usr/lib/debug:/var/cache/abrt-di/usr/lib/debug' -ex 'file /usr/lib/thunderbird-3.0/thunderbird-bin' -ex 'core-file /var/cache/abrt/ccpp-1276164960-8012/coredump' -ex 'thread apply all backtrace 2048 full' -ex 'info sharedlib' -ex 'print (char*)__abort_msg' -ex 'print (char*)__glib_assert_msg' -ex 'info registers' -ex disassemble
component: gdb
crash_function: raise
executable: /usr/bin/gdb
global_uuid: 75ee644048798eca0bcc2bd9936188ec926f2bdc
kernel: 2.6.33.5-112.fc13.i686.PAE
package: gdb-7.1-24.fc13
rating: 4
reason: Process /usr/bin/gdb was killed by signal 6 (SIGABRT)
release: Fedora release 13 (Goddard)

Comment 1 Piotr Kolaczek 2010-06-10 11:49:43 UTC
Created attachment 422878 [details]
File: backtrace

Comment 2 Jan Kratochvil 2010-06-11 13:20:21 UTC
GDB tries to run pex_run_in_environment("iconv -l") which aborts creating files in /tmp.  GDB should be able to run even with readonly root filesystem.

Comment 3 Tom Tromey 2010-06-21 21:56:20 UTC
Try this:

diff --git a/gdb/charset.c b/gdb/charset.c
index 8a9b5ad..e9fa6ab 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -800,7 +800,8 @@ find_charset_names (void)
   args[1] = "-l";
   args[2] = NULL;
   /* Note that we simply ignore errors here.  */
-  if (!pex_run_in_environment (child, PEX_SEARCH | PEX_STDERR_TO_STDOUT,
+  if (!pex_run_in_environment (child, (PEX_SEARCH | PEX_STDERR_TO_STDOUT
+				       | PEX_USE_PIPES),
 			       "iconv", args, environ_vector (iconv_env),
 			       NULL, NULL, &err))
     {

Comment 4 Jan Kratochvil 2010-06-24 17:31:25 UTC
Posted upstream, PEX_USE_PIPES is OK, pex_run_in_environment is not, thanks:
http://sourceware.org/ml/gdb-patches/2010-06/msg00537.html

Comment 5 Fedora Update System 2010-08-06 16:52:23 UTC
gdb-7.1-32.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/gdb-7.1-32.fc13

Comment 6 Fedora Update System 2010-08-06 21:03:50 UTC
gdb-7.1-32.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.