bugGNUstep - Bugs: bug #26766, Segfault when connecting to...

 
 

bug #26766: Segfault when connecting to distributed notification centre

Submitted by:  Gregory John Casamento <gcasa>
Submitted on:  Tue 09 Jun 2009 08:13:23 PM UTC  
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Wed 24 Jun 2009 07:05:21 PM UTC, comment #8: 

closed on request of the user.

Riccardo Mottola <rmottola>
Project Member
Wed 24 Jun 2009 01:03:53 AM UTC, comment #7: 

Ok -- this seemed to be cleared up by switching from ffcall library to libffi.

Jonathan Gillaspie <jonathanosx>
Project Member
Fri 12 Jun 2009 07:05:47 AM UTC, comment #6: 

I had sth. similar on OpenBSD sparc64 a while ago, and I guess it is still there, take a look at bug #23040. There the crasher is in line 780, I guess the offset of just two lines is from a code change meanwhile. Haven't tested latest versions since then, but I guess it is still the same.

Sebastian Reitenbach <buzzdee>
Project Member
Fri 12 Jun 2009 02:05:21 AM UTC, comment #5: 

While advice about killing all existing processes and then making sure only one copy of gdnc is running is good, the problem is a segmentation fault rather than an exception, so there is an issue in the local process (even if it's triggered by something else going on in a remote one), so I don't think looking at gdnc will help.

The segfault is at 'NSDistributedNotificationCenter.m:782' which (assuming the code is running a recent version of the base library) is in the call to -registerClient: in the gdnc process ... ie it's at the point when handling sending of a DO method or receiving its response.

That pretty  much isolates the issue to the ffcall or ffi library and/or its interaction with  gnustep-base.  I don't know what system this is running on, but the gdb warning 'Using host libthread_db library "/lib64/libthread_db.so.1".' suggests it's a 64bit cpu, and we know that support for 64bit systems in libffi and ffcall has historically been rather weak, so the thing to do would be to check that the base library is linked with the latest available libffi (which might mean something more recent than whatever comes with the operating system).

If that doesn't work then the thing to do is set a breakpoint at NSDistributedNotificationCenter.m:782 and then step through instruction by instruction to find where things are going wrong ... if the crash is inside libffi itsself, this would also need you to get the source for libffi and build/use it so that gdb could show you the code as you step through.

Richard Frith-Macdonald <CaS>
Project Member
Thu 11 Jun 2009 10:42:57 AM UTC, comment #4: 

please check the following:

1. only one version of gdnc installed and linked against current core libaries
2. gdnc is installed is installed as root (on smoe system it works without, but it shoudl really, you should  perform make install as root when being in the Tools directory containint gdnc, or you install your whole gnustep stuff as root)
3. if you have GWorkspace, uninstall, clean, recompile and install that one too (just to be on the safe side)
4. make sure you have gdomap and gdnc entries in /etc/services

then you can to the following:

1. kill all gnustep processes, including gdomap and gdnc.
2. open a shell, run in it "gdnc -f"
You should see no errors and gdnc should not return to the prompt (it means that it did not fork and remains waiting for connection)
3. in another shell start your application

hope that it works. If not, two thing used to happen to me in the past:
- gdnc in the other shell dies - thus it is a gdnc problem
- the application attempts to start another gdnc instance but the one you started non-forking remains running

Riccardo Mottola <rmottola>
Project Member
Wed 10 Jun 2009 06:44:45 AM UTC, comment #3: 

Thank you for the additional information. I changed the bug to the base category and adjusted the summary.

From what I understand this looks like there is a communication problem between the gdnc process and SystemPreferences. Could you make sure that there is only one current version of gdnc installed on your machine and that this one is up and running.

Fred Kiefer <FredKiefer>
Project Member
Tue 09 Jun 2009 09:00:20 PM UTC, comment #2: 

(gdb) run
Starting program: /usr/GNUstep/System/Applications/SystemPreferences.app/SystemPreferences
[Thread debugging using libthread_db enabled]
Warning: guessed host libthread_db library "/lib64/libthread_db.so.1".
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0xf74166b0 (LWP 18060)]
2009-06-09 20:52:49.401 SystemPreferences[18060] Unknown time zone name `PST'.
2009-06-09 20:52:49.401 SystemPreferences[18060] Using time zone with absolute offset 0.
2009-06-09 20:52:49.400 SystemPreferences[18060] XShm pixmaps not supported by X server.
2009-06-09 20:52:49.401 SystemPreferences[18060] Falling back to normal XImage: s (will be slower).

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf74166b0 (LWP 18060)]
0x0807c330 in ?? ()
(gdb) bt
#0  0x0807c330 in ?? ()
#1  0xf79422da in -[NSDistributedNotificationCenter(Private) _connect] (self=0x8316c00, _cmd=0xf7b8e308) at NSDistributedNotificationCenter.m:782
#2  0xf7940b0b in -[NSDistributedNotificationCenter addObserver:selector:name:object:suspensionBehavior:] (self=0x8316c00, _cmd=0xf7b8e2f0, anObserver=0x8315228, aSelector=0xf7fa19d8, notificationName=0x0, anObject=0xf7fa0ee0,
    suspensionBehavior=2) at NSDistributedNotificationCenter.m:341
#3  0xf7940809 in -[NSDistributedNotificationCenter addObserver:selector:name:object:] (self=0x8316c00, _cmd=0xf7fa19e0, anObserver=0x8315228, aSelector=0xf7fa19d8, notificationName=0x0, anObject=0xf7fa0ee0)
    at NSDistributedNotificationCenter.m:266
#4  0xf7e54812 in -[_GSWorkspaceCenter init] (self=0x8315228, _cmd=0xf7ba48c8) at NSWorkspace.m:283
#5  0xf798c609 in +[NSObject new] (self=0xf7fa1860, _cmd=0xf7fa1960) at NSObject.m:1101
#6  0xf7e5569f in -[NSWorkspace init] (self=0x83143b0, _cmd=0xf7fa19c8) at NSWorkspace.m:642
#7  0xf7e554d4 in +[NSWorkspace sharedWorkspace] (self=0xf7fa1760, _cmd=0xf7f02840) at NSWorkspace.m:611
#8  0xf7cad657 in -[NSApplication finishLaunching] (self=0x8155f08, _cmd=0xf7f02940) at NSApplication.m:1064
#9  0xf7caeebd in -[NSApplication run] (self=0x8155f08, _cmd=0x804f4f0) at NSApplication.m:1438
#10 0x0804916f in main () at main.m:13

Jonathan Gillaspie <jonathanosx>
Project Member
Tue 09 Jun 2009 08:57:39 PM UTC, comment #1: 

We will need a bit more information than this to resolve the issue. There is no sign that the fall back, that happens on all newer X11 systems, and the segmentation fault are in any way related. Could you please run the application in a debugger and report thefull backtrace?

A simalar error has been reported on the mailing list last week and in that case the reason was that two versions of SystemPreferences where installed on the computer, one in Local and one in System. Removing these and reinstalling resolved the problem.

Fred Kiefer <FredKiefer>
Project Member
Tue 09 Jun 2009 08:13:23 PM UTC, original submission:  

/usr/GNUstep/System/Applications/SystemPreferences.app/SystemPreferences
2009-06-08 16:25:59.718 SystemPreferences[1689] Unknown time zone name `PST'.
2009-06-08 16:25:59.718 SystemPreferences[1689] Using time zone with absolute offset 0.
2009-06-08 16:25:59.713 SystemPreferences[1689] XShm pixmaps not supported by X server.
2009-06-08 16:25:59.718 SystemPreferences[1689] Falling back to normal XImage: s (will be slower).
Segmentation fault

This was recently reported to me... I'm not sure why it's happening and I can't reproduce it myself. 

GC

Gregory John Casamento <gcasa>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by buzzdee (Posted a comment)
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by rmottola (Posted a comment)
  • -email is unavailable- added by jonathanosx (Posted a comment)
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by gcasa
  • -email is unavailable- added by gcasa (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-06-24 rmottola Open/ClosedOpen => Closed
    2009-06-10 FredKiefer CategoryGui/AppKit => Base/Foundation
        StatusNeed Info => None
        SummarySegfault when falling back to Ximage.... => Segfault when connecting to distributed notification centre
    2009-06-09 FredKiefer StatusNone => Need Info
    2009-06-09 gcasa CategoryNone => Gui/AppKit
        Item GroupNone => Bug
        Carbon-Copy- => Added jonathan.gillaspie@testplant.com

    Back to the top


    Powered by Savane 3.6