Bug 8363

Summary: System bus crashes on Mac OS X 10.4
Product: dbus Reporter: Randall Wood <rhwood>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED WONTFIX QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium Keywords: NEEDINFO
Version: unspecified   
Hardware: PowerPC   
OS: Mac OS X (All)   
Whiteboard: unreproducible on 10.6
i915 platform: i915 features:
Attachments: Installation log
0.94 Build log with --enable-tests
0.94 make check after building with --enable-tests
make check log for 0.94 with bus/bus.c patched as in comments
download/configure/build/test log from CVS HEAD

Description Randall Wood 2006-09-20 00:41:57 UTC
When launching the dbus-daemon with the --system flag, the daemon crashes like so:

**********

Host Name:      Getafix
Date/Time:      2006-09-19 17:04:21.482 -0400
OS Version:     10.4.7 (Build 8J135)
Report Version: 4

Command: dbus-daemon
Path:    /opt/local/bin/dbus-daemon
Parent:  launchd [1]

Version: ??? (???)

PID:    7711
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000004

Thread 0 Crashed:
0   dbus-daemon 	0x000262b8 _dbus_list_prepend + 72
1   dbus-daemon 	0x00026220 _dbus_list_append + 40
2   dbus-daemon 	0x00026fe4 add_callback + 48
3   dbus-daemon 	0x000272e4 _dbus_loop_add_watch + 108
4   dbus-daemon 	0x00012090 bus_watch_directory + 340
5   dbus-daemon 	0x00026cc8 _dbus_list_foreach + 136
6   dbus-daemon 	0x00005de0 process_config_postinit + 168
7   dbus-daemon 	0x000064c8 bus_context_new + 1732
8   dbus-daemon 	0x0001e720 main + 1972
9   dbus-daemon 	0x00001ea4 _start + 760
10  dbus-daemon 	0x00001ba8 start + 48

Thread 0 crashed with PPC Thread State 64:
  srr0: 0x00000000000262b8 srr1: 0x000000000000d030                        vrsave: 
0x0000000000000000
    cr: 0x24000244          xer: 0x0000000000000004   lr: 0x0000000000026294  ctr: 
0x0000000090003e50
    r0: 0x0000000000300904   r1: 0x00000000bffff3d0   r2: 0x0000000000000004   r3: 
0x0000000000300904
    r4: 0x00000000003008d0   r5: 0x0000000000000000   r6: 0x0000000000000006   r7: 
0x0000000000000007
    r8: 0x0000000000402015   r9: 0x000000000000000c  r10: 0x0000000000400011  r11: 
0x00000000003008f0
   r12: 0x0000000090003858  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 
0x0000000000000000
   r16: 0x0000000000000000  r17: 0x0000000000000000  r18: 0x0000000000000000  r19: 
0x0000000000000000
   r20: 0x0000000000000000  r21: 0x0000000000000000  r22: 0x0000000000000000  r23: 
0x0000000000000000
   r24: 0x0000000000000000  r25: 0x0000000000000002  r26: 0x00000000bffff970  r27: 
0x00000000bffff910
   r28: 0x00000000bffff904  r29: 0x000000000006104c  r30: 0x00000000bffff3d0  r31: 
0x0000000000011f54

Binary Images Description:
    0x1000 -    0x68fff dbus-daemon 	/opt/local/bin/dbus-daemon
   0x7b000 -    0x99fff libexpat.1.dylib 	/opt/local/lib/libexpat.1.dylib
0x8fe00000 - 0x8fe52fff dyld 45.3	/usr/lib/dyld
0x90000000 - 0x901bbfff libSystem.B.dylib 	/usr/lib/libSystem.B.dylib
0x90213000 - 0x90218fff libmathCommon.A.dylib 	/usr/lib/system/libmathCommon.A.dylib

**********

Host Name:      Getafix
Date/Time:      2006-09-19 17:08:42.020 -0400
OS Version:     10.4.7 (Build 8J135)
Report Version: 4

Command: dbus-daemon
Path:    /opt/local/bin/dbus-daemon
Parent:  launchd [1]

Version: ??? (???)

PID:    24333
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000004

Thread 0 Crashed:
0   dbus-daemon 	0x000262b8 _dbus_list_prepend + 72
1   dbus-daemon 	0x00026220 _dbus_list_append + 40
2   dbus-daemon 	0x00026fe4 add_callback + 48
3   dbus-daemon 	0x000272e4 _dbus_loop_add_watch + 108
4   dbus-daemon 	0x00012090 bus_watch_directory + 340
5   dbus-daemon 	0x00026cc8 _dbus_list_foreach + 136
6   dbus-daemon 	0x00005de0 process_config_postinit + 168
7   dbus-daemon 	0x000064c8 bus_context_new + 1732
8   dbus-daemon 	0x0001e720 main + 1972
9   dbus-daemon 	0x00001ea4 _start + 760
10  dbus-daemon 	0x00001ba8 start + 48

Thread 0 crashed with PPC Thread State 64:
  srr0: 0x00000000000262b8 srr1: 0x000000000000d030                        vrsave: 
0x0000000000000000
    cr: 0x24000244          xer: 0x0000000000000004   lr: 0x0000000000026294  ctr: 
0x0000000090003e50
    r0: 0x0000000000300904   r1: 0x00000000bffff3d0   r2: 0x0000000000000004   r3: 
0x0000000000300904
    r4: 0x00000000003008d0   r5: 0x0000000000000000   r6: 0x0000000000000006   r7: 
0x0000000000000007
    r8: 0x0000000000402015   r9: 0x000000000000000c  r10: 0x0000000000400011  r11: 
0x00000000003008f0
   r12: 0x0000000090003858  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 
0x0000000000000000
   r16: 0x0000000000000000  r17: 0x0000000000000000  r18: 0x0000000000000000  r19: 
0x0000000000000000
   r20: 0x0000000000000000  r21: 0x0000000000000000  r22: 0x0000000000000000  r23: 
0x0000000000000000
   r24: 0x0000000000000000  r25: 0x0000000000000002  r26: 0x00000000bffff970  r27: 
0x00000000bffff910
   r28: 0x00000000bffff904  r29: 0x000000000006104c  r30: 0x00000000bffff3d0  r31: 
0x0000000000011f54

Binary Images Description:
    0x1000 -    0x68fff dbus-daemon 	/opt/local/bin/dbus-daemon
   0x7b000 -    0x99fff libexpat.1.dylib 	/opt/local/lib/libexpat.1.dylib
0x8fe00000 - 0x8fe52fff dyld 45.3	/usr/lib/dyld
0x90000000 - 0x901bbfff libSystem.B.dylib 	/usr/lib/libSystem.B.dylib
0x90213000 - 0x90218fff libmathCommon.A.dylib 	/usr/lib/system/libmathCommon.A.dylib

**********

Host Name:      Getafix
Date/Time:      2006-09-19 18:58:23.394 -0400
OS Version:     10.4.7 (Build 8J135)
Report Version: 4

Command: dbus-daemon
Path:    /opt/local/bin/dbus-daemon
Parent:  launchd [1]

Version: ??? (???)

PID:    11309
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000004

Thread 0 Crashed:
0   dbus-daemon 	0x000262b8 _dbus_list_prepend + 72
1   dbus-daemon 	0x00026220 _dbus_list_append + 40
2   dbus-daemon 	0x00026fe4 add_callback + 48
3   dbus-daemon 	0x000272e4 _dbus_loop_add_watch + 108
4   dbus-daemon 	0x00012090 bus_watch_directory + 340
5   dbus-daemon 	0x00026cc8 _dbus_list_foreach + 136
6   dbus-daemon 	0x00005de0 process_config_postinit + 168
7   dbus-daemon 	0x000064c8 bus_context_new + 1732
8   dbus-daemon 	0x0001e720 main + 1972
9   dbus-daemon 	0x00001ea4 _start + 760
10  dbus-daemon 	0x00001ba8 start + 48

Thread 0 crashed with PPC Thread State 64:
  srr0: 0x00000000000262b8 srr1: 0x000000000000d030                        vrsave: 
0x0000000000000000
    cr: 0x24000244          xer: 0x0000000000000004   lr: 0x0000000000026294  ctr: 
0x0000000090003e50
    r0: 0x0000000000300904   r1: 0x00000000bffff3d0   r2: 0x0000000000000004   r3: 
0x0000000000300904
    r4: 0x00000000003008d0   r5: 0x0000000000000000   r6: 0x0000000000000006   r7: 
0x0000000000000007
    r8: 0x0000000000402015   r9: 0x000000000000000c  r10: 0x0000000000400011  r11: 
0x00000000003008f0
   r12: 0x0000000090003858  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 
0x0000000000000000
   r16: 0x0000000000000000  r17: 0x0000000000000000  r18: 0x0000000000000000  r19: 
0x0000000000000000
   r20: 0x0000000000000000  r21: 0x0000000000000000  r22: 0x0000000000000000  r23: 
0x0000000000000000
   r24: 0x0000000000000000  r25: 0x0000000000000002  r26: 0x00000000bffff970  r27: 
0x00000000bffff910
   r28: 0x00000000bffff904  r29: 0x000000000006104c  r30: 0x00000000bffff3d0  r31: 
0x0000000000011f54

Binary Images Description:
    0x1000 -    0x68fff dbus-daemon 	/opt/local/bin/dbus-daemon
   0x7b000 -    0x99fff libexpat.1.dylib 	/opt/local/lib/libexpat.1.dylib
0x8fe00000 - 0x8fe52fff dyld 45.3	/usr/lib/dyld
0x90000000 - 0x901bbfff libSystem.B.dylib 	/usr/lib/libSystem.B.dylib
0x90213000 - 0x90218fff libmathCommon.A.dylib 	/usr/lib/system/libmathCommon.A.dylib

**********

Host Name:      Getafix
Date/Time:      2006-09-19 21:02:14.139 -0400
OS Version:     10.4.7 (Build 8J135)
Report Version: 4

Command: dbus-daemon
Path:    /opt/local/bin/dbus-daemon
Parent:  launchd [1]

Version: ??? (???)

PID:    17930
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000004

Thread 0 Crashed:
0   dbus-daemon 	0x000262b8 _dbus_list_prepend + 72
1   dbus-daemon 	0x00026220 _dbus_list_append + 40
2   dbus-daemon 	0x00026fe4 add_callback + 48
3   dbus-daemon 	0x000272e4 _dbus_loop_add_watch + 108
4   dbus-daemon 	0x00012090 bus_watch_directory + 340
5   dbus-daemon 	0x00026cc8 _dbus_list_foreach + 136
6   dbus-daemon 	0x00005de0 process_config_postinit + 168
7   dbus-daemon 	0x000064c8 bus_context_new + 1732
8   dbus-daemon 	0x0001e720 main + 1972
9   dbus-daemon 	0x00001ea4 _start + 760
10  dbus-daemon 	0x00001ba8 start + 48

Thread 0 crashed with PPC Thread State 64:
  srr0: 0x00000000000262b8 srr1: 0x000000000000d030                        vrsave: 
0x0000000000000000
    cr: 0x24000244          xer: 0x0000000000000004   lr: 0x0000000000026294  ctr: 
0x0000000090003e50
    r0: 0x0000000000300904   r1: 0x00000000bffff3d0   r2: 0x0000000000000004   r3: 
0x0000000000300904
    r4: 0x00000000003008d0   r5: 0x0000000000000000   r6: 0x0000000000000006   r7: 
0x0000000000000007
    r8: 0x0000000000402015   r9: 0x000000000000000c  r10: 0x0000000000400011  r11: 
0x00000000003008f0
   r12: 0x0000000090003858  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 
0x0000000000000000
   r16: 0x0000000000000000  r17: 0x0000000000000000  r18: 0x0000000000000000  r19: 
0x0000000000000000
   r20: 0x0000000000000000  r21: 0x0000000000000000  r22: 0x0000000000000000  r23: 
0x0000000000000000
   r24: 0x0000000000000000  r25: 0x0000000000000002  r26: 0x00000000bffff970  r27: 
0x00000000bffff910
   r28: 0x00000000bffff904  r29: 0x000000000006104c  r30: 0x00000000bffff3d0  r31: 
0x0000000000011f54

Binary Images Description:
    0x1000 -    0x68fff dbus-daemon 	/opt/local/bin/dbus-daemon
   0x7b000 -    0x99fff libexpat.1.dylib 	/opt/local/lib/libexpat.1.dylib
0x8fe00000 - 0x8fe52fff dyld 45.3	/usr/lib/dyld
0x90000000 - 0x901bbfff libSystem.B.dylib 	/usr/lib/libSystem.B.dylib
0x90213000 - 0x90218fff libmathCommon.A.dylib 	/usr/lib/system/libmathCommon.A.dylib

**********

Host Name:      Getafix
Date/Time:      2006-09-20 03:35:37.847 -0400
OS Version:     10.4.7 (Build 8J135)
Report Version: 4

Command: dbus-daemon
Path:    /opt/local/bin/dbus-daemon
Parent:  launchd [1]

Version: ??? (???)

PID:    4761
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000004

Thread 0 Crashed:
0   dbus-daemon 	0x000262b8 _dbus_list_prepend + 72
1   dbus-daemon 	0x00026220 _dbus_list_append + 40
2   dbus-daemon 	0x00026fe4 add_callback + 48
3   dbus-daemon 	0x000272e4 _dbus_loop_add_watch + 108
4   dbus-daemon 	0x00012090 bus_watch_directory + 340
5   dbus-daemon 	0x00026cc8 _dbus_list_foreach + 136
6   dbus-daemon 	0x00005de0 process_config_postinit + 168
7   dbus-daemon 	0x000064c8 bus_context_new + 1732
8   dbus-daemon 	0x0001e720 main + 1972
9   dbus-daemon 	0x00001ea4 _start + 760
10  dbus-daemon 	0x00001ba8 start + 48

Thread 0 crashed with PPC Thread State 64:
  srr0: 0x00000000000262b8 srr1: 0x000000000000d030                        vrsave: 
0x0000000000000000
    cr: 0x24000244          xer: 0x0000000000000004   lr: 0x0000000000026294  ctr: 
0x0000000090003e50
    r0: 0x0000000000300904   r1: 0x00000000bffff3d0   r2: 0x0000000000000004   r3: 
0x0000000000300904
    r4: 0x00000000003008d0   r5: 0x0000000000000000   r6: 0x0000000000000006   r7: 
0x0000000000000007
    r8: 0x0000000000402015   r9: 0x000000000000000c  r10: 0x0000000000400011  r11: 
0x00000000003008f0
   r12: 0x0000000090003858  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 
0x0000000000000000
   r16: 0x0000000000000000  r17: 0x0000000000000000  r18: 0x0000000000000000  r19: 
0x0000000000000000
   r20: 0x0000000000000000  r21: 0x0000000000000000  r22: 0x0000000000000000  r23: 
0x0000000000000000
   r24: 0x0000000000000000  r25: 0x0000000000000002  r26: 0x00000000bffff970  r27: 
0x00000000bffff910
   r28: 0x00000000bffff904  r29: 0x000000000006104c  r30: 0x00000000bffff3d0  r31: 
0x0000000000011f54

Binary Images Description:
    0x1000 -    0x68fff dbus-daemon 	/opt/local/bin/dbus-daemon
   0x7b000 -    0x99fff libexpat.1.dylib 	/opt/local/lib/libexpat.1.dylib
0x8fe00000 - 0x8fe52fff dyld 45.3	/usr/lib/dyld
0x90000000 - 0x901bbfff libSystem.B.dylib 	/usr/lib/libSystem.B.dylib
0x90213000 - 0x90218fff libmathCommon.A.dylib 	/usr/lib/system/libmathCommon.A.dylib
Comment 1 Randall Wood 2006-09-20 00:44:38 UTC
Created attachment 7092 [details]
Installation log

The attached log gives the build history and build environment for the crashing
dbus. Lines starting DEBUG: are from port, the build automation tool from
macports.org.
Comment 2 John (J5) Palmieri 2006-10-11 10:32:35 UTC
Please compile witch tests and checks.  The --enable-tests bug should be fixed
in CVS.
Comment 3 Randall Wood 2006-10-16 02:03:19 UTC
Created attachment 7421 [details]
0.94 Build log with --enable-tests

Log of configure & build of version 0.94

Log was generated using the MacPorts port command and so includes output from
that command that wraps the configure and make commands.
Comment 4 Randall Wood 2006-10-16 02:05:18 UTC
Created attachment 7422 [details]
0.94 make check after building with --enable-tests

If I knew how to use gdb or to compile with a backtrace, I would be able to
provide that information as well.
Comment 5 Randall Wood 2006-10-16 02:08:09 UTC
Crash when running the command "sudo dbus-daemon --system":

**********

Host Name:      Getafix
Date/Time:      2006-10-15 21:18:28.325 -0400
OS Version:     10.4.8 (Build 8L127)
Report Version: 4

Command: dbus-daemon
Path:    /opt/local/bin/dbus-daemon
Parent:  launchd [1]

Version: ??? (???)

PID:    10950
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000004

Thread 0 Crashed:
0   dbus-daemon 	0x000330ac _dbus_list_prepend + 72
1   dbus-daemon 	0x00033014 _dbus_list_append + 40
2   dbus-daemon 	0x00034ef8 add_callback + 48
3   dbus-daemon 	0x000351f8 _dbus_loop_add_watch + 108
4   dbus-daemon 	0x00013f7c bus_watch_directory + 340
5   dbus-daemon 	0x00033bcc _dbus_list_foreach + 136
6   dbus-daemon 	0x00006a1c process_config_postinit + 168
7   dbus-daemon 	0x00007104 bus_context_new + 1732
8   dbus-daemon 	0x000278f8 main + 1972
9   dbus-daemon 	0x0000201c _start + 760
10  dbus-daemon 	0x00001d20 start + 48

Thread 0 crashed with PPC Thread State 64:
  srr0: 0x00000000000330ac srr1: 0x000000000000d030                        vrsave: 
0x0000000000000000
    cr: 0x24000244          xer: 0x0000000000000004   lr: 0x0000000000033088  ctr: 
0x0000000090003730
    r0: 0x0000000000300904   r1: 0x00000000bffff3f0   r2: 0x0000000000000004   r3: 
0x0000000000300904
    r4: 0x00000000003008d0   r5: 0x0000000000000000   r6: 0x0000000000000006   r7: 
0x0000000000000007
    r8: 0x0000000000402015   r9: 0x000000000000000c  r10: 0x0000000000400011  r11: 
0x00000000003008f0
   r12: 0x0000000090003138  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 
0x0000000000000000
   r16: 0x0000000000000000  r17: 0x0000000000000000  r18: 0x0000000000000000  r19: 
0x0000000000000000
   r20: 0x0000000000000000  r21: 0x0000000000000000  r22: 0x0000000000000000  r23: 
0x0000000000000000
   r24: 0x0000000000000000  r25: 0x0000000000000002  r26: 0x00000000bffff980  r27: 
0x00000000bffff920
   r28: 0x00000000bffff914  r29: 0x000000000007955c  r30: 0x00000000bffff3f0  r31: 
0x0000000000013e40

Binary Images Description:
    0x1000 -    0x85fff dbus-daemon 	/opt/local/bin/dbus-daemon
   0x9c000 -    0xbafff libexpat.1.dylib 	/opt/local/lib/libexpat.1.dylib
0x8fe00000 - 0x8fe51fff dyld 45.3	/usr/lib/dyld
0x90000000 - 0x901bcfff libSystem.B.dylib 	/usr/lib/libSystem.B.dylib
0x90214000 - 0x90219fff libmathCommon.A.dylib 	/usr/lib/system/libmathCommon.A.dylib
Comment 6 John (J5) Palmieri 2006-10-16 09:13:49 UTC
looks like check_get_connection_unix_process_id isn't getting a pid in the
tests.  Hmm, perhaps I should get that macbook since I need to return this
laptop to the Desktop group ;-)

In any case there are two errors here.  The unix_process_id error and array out
of bounds for the file watch code which is different on *BSD and Linux.  My
guess is the patch I asked the FreeBSD guys to hack up, which hasn't been
submitted yet, is the problem.  Can you do me a favor and add this bit:

in bus/bus.c function process_config_postinit there is a call to
_dbus_list_foreach where the last parameter is NULL.  Change that NULL to
bus_context_get_loop (context) and try compiling and running the bus.

Looking at the FreeBSD patch (Bug #8298) I think it will also fix up the
check_get_connection_unix_process_id bug also.  If the above fixes the first
part I'm going to mark this bug as a duplicate.
Comment 7 Randall Wood 2006-10-31 03:11:59 UTC
Created attachment 7605 [details]
make check log for 0.94 with bus/bus.c patched as in comments

Fails on the same procedure but in a different test. I tried the full set of
patches from the BSD patches (changing #ifdef __FreeBSD__ to #ifdef __APPLE__)
and the test fails the same.
Comment 8 John (J5) Palmieri 2006-10-31 08:33:57 UTC
Can you try the source from CVS?  Thanks
Comment 9 Randall Wood 2006-12-03 02:29:21 UTC
Created attachment 7946 [details]
download/configure/build/test log from CVS HEAD

This log is from a download/configure/build/test cycle that was automated using
the MacPorts.org port command.
Comment 10 Benjamin Close 2008-01-11 02:36:48 UTC
Bugzilla Upgrade Mass Bug Change

NEEDSINFO state was removed in Bugzilla 3.x, reopening any bugs previously listed as NEEDSINFO.

  - benjsc
    fd.o Wrangler
Comment 11 Mike McQuaid 2010-12-30 03:19:00 UTC
I can't reproduce this on 10.6. Can you try with the latest master? Otherwise this can be closed.
Comment 12 Randall Wood 2011-01-27 15:59:18 UTC
I no longer have access to a Mac OS X 10.4 system. I suggest that this bug be resolved as "won't fix" and reopened if a Mac OS X 10.4 user experiences this issue and is available to assist in addressing it.
Comment 13 Simon McVittie 2011-04-07 10:40:04 UTC
(In reply to comment #12)
> I no longer have access to a Mac OS X 10.4 system. I suggest that this bug be
> resolved as "won't fix" and reopened if a Mac OS X 10.4 user experiences this
> issue and is available to assist in addressing it.

Sounds good to me.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.