Bug 153281

Summary: editors/emacs: glib warning when starting emacs
Product: Ports & Packages Reporter: Sam Sirlin <swsirlin>
Component: Individual Port(s)Assignee: Ashish SHUKLA <ashish>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
.xinitrc none

Description Sam Sirlin 2010-12-18 21:20:09 UTC
I use startx to start X11, then run e16 wm. For some time, every time I start emacs from a terminal I see:
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2010-12-25 13:53:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ashish

Over to emacs maintainer for evaluation
Comment 2 Ashish SHUKLA freebsd_committer freebsd_triage 2011-01-10 06:39:36 UTC
Hi Sam,

My apologies for not replying to it earlier.

Could you please provide few details about your FreeBSD environment setup:

1. Do you use startx ? Or do you're using some kind of login manager like
   xdm/gdm/kdm ?

2. If you're using startx, could you please provide your .xinitrc ? Just
   wanted to know if you're launching a DBus session daemon.

3. Please mention the version of dbus, dbus-glib, and gconf, you're using.

Thanks
-- 
Ashish SHUKLA      | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

Avoid Success At All Costs !!
Comment 3 Sam Sirlin 2011-01-10 18:30:54 UTC
Ashish SHUKLA wrote:
> Hi Sam,
>
> My apologies for not replying to it earlier.
>    
That's ok, nothing critical. Just a bit annoying.

> Could you please provide few details about your FreeBSD environment setup:
>
> 1. Do you use startx ? Or do you're using some kind of login manager like
>     xdm/gdm/kdm ?
>    
Just startx, with e16.
> 2. If you're using startx, could you please provide your .xinitrc ? Just
>     wanted to know if you're launching a DBus session daemon.
>    
I've attached my .xinitrc... evolved from a version used on sunos, 
solaris, FreeBSD 2 ...
I do not explicitly launch dbus, but it seems to get started:

ps x | grep dbu
  1536  ??  I      0:00.00 dbus-launch 
--autolaunch=ebc2647b26be515bda952e680000
  1537  ??  Is     0:00.01 /usr/local/bin/dbus-daemon --fork --print-pid 
5 --pri

> 3. Please mention the version of dbus, dbus-glib, and gconf, you're using.
>    
dir /var/db/pkg/ | grep dbus
dbus-1.4.1/
dbus-glib-0.88/
e_dbus-1.0.0.b,1/
eggdbus-0.6_1/

dir /var/db/pkg/ | grep gconf
gconf-1.0.9_17/
gconf2-2.32.0_2/

Comment 4 Ashish SHUKLA freebsd_committer freebsd_triage 2011-01-11 16:57:22 UTC
sam sirlin writes:
> Ashish SHUKLA wrote:
>> Hi Sam,
>> 
>> My apologies for not replying to it earlier.
>> 
> That's ok, nothing critical. Just a bit annoying.


>> Could you please provide few details about your FreeBSD environment setup:
>> 
>> 1. Do you use startx ? Or do you're using some kind of login manager like
>> xdm/gdm/kdm ?
>> 
> Just startx, with e16.
>> 2. If you're using startx, could you please provide your .xinitrc ? Just
>> wanted to know if you're launching a DBus session daemon.
>> 
> I've attached my .xinitrc... evolved from a version used on sunos,
> solaris, FreeBSD 2 ...
> I do not explicitly launch dbus, but it seems to get started:


> ps x | grep dbu
>  1536  ??  I      0:00.00 dbus-launch
> --autolaunch=ebc2647b26be515bda952e680000
>  1537  ??  Is     0:00.01 /usr/local/bin/dbus-daemon --fork
> --print-pid 5 --pri


>> 3. Please mention the version of dbus, dbus-glib, and gconf, you're using.
>> 
> dir /var/db/pkg/ | grep dbus
> dbus-1.4.1/
> dbus-glib-0.88/
> e_dbus-1.0.0.b,1/
> eggdbus-0.6_1/


> dir /var/db/pkg/ | grep gconf
> gconf-1.0.9_17/
> gconf2-2.32.0_2/


Well, GNU Emacs depends on DBus now, and it tries to connect to a DBus session
bus, and when it is not able to find DBus session bus running, it launches
it. To get rid of that annoying warning, following is what I've in my
.xinitrc, and I don't get that warning:

#v+
#!/bin/sh

xrdb ~/.Xdefaults
xmodmap ~/.Xmodmap
gnome-screensaver &
exec dbus-launch --exit-with-session fluxbox 2>&1 >$HOME/.xsession-errors
#v-

HTH
-- 
Ashish SHUKLA

âThere is nothing new to be discovered in physics now; All that
remains is more and more precise measurement.â (Lord Kelvin, 1900)
Comment 5 Sam Sirlin 2011-01-12 00:03:02 UTC
Ashish SHUKLA wrote:
> sam sirlin writes:
>    
>> Ashish SHUKLA wrote:
>>      
>>> Hi Sam,
>>>
>>> My apologies for not replying to it earlier.
>>>
>>>        
>> That's ok, nothing critical. Just a bit annoying.
>>      
>    
>>> Could you please provide few details about your FreeBSD environment setup:
>>>
>>> 1. Do you use startx ? Or do you're using some kind of login manager like
>>> xdm/gdm/kdm ?
>>>
>>>        
>> Just startx, with e16.
>>      
>>> 2. If you're using startx, could you please provide your .xinitrc ? Just
>>> wanted to know if you're launching a DBus session daemon.
>>>
>>>        
>> I've attached my .xinitrc... evolved from a version used on sunos,
>> solaris, FreeBSD 2 ...
>> I do not explicitly launch dbus, but it seems to get started:
>>      
>    
>> ps x | grep dbu
>>   1536  ??  I      0:00.00 dbus-launch
>> --autolaunch=ebc2647b26be515bda952e680000
>>   1537  ??  Is     0:00.01 /usr/local/bin/dbus-daemon --fork
>> --print-pid 5 --pri
>>      
>    
>>> 3. Please mention the version of dbus, dbus-glib, and gconf, you're using.
>>>
>>>        
>> dir /var/db/pkg/ | grep dbus
>> dbus-1.4.1/
>> dbus-glib-0.88/
>> e_dbus-1.0.0.b,1/
>> eggdbus-0.6_1/
>>      
>    
>> dir /var/db/pkg/ | grep gconf
>> gconf-1.0.9_17/
>> gconf2-2.32.0_2/
>>      
> Well, GNU Emacs depends on DBus now, and it tries to connect to a DBus session
> bus, and when it is not able to find DBus session bus running, it launches
> it. To get rid of that annoying warning, following is what I've in my
> .xinitrc, and I don't get that warning:
>
> #v+
> #!/bin/sh
>
> xrdb ~/.Xdefaults
> xmodmap ~/.Xmodmap
> gnome-screensaver&
> exec dbus-launch --exit-with-session fluxbox 2>&1>$HOME/.xsession-errors
>    
I tried
exec dbus-launch --exit-with-session e16

which did stop the warning, but things seemed to run somewhat slower...

Since dbus is apparently the trouble, I rebuilt emacs without dbus 
support, still the warning; so then in addition I turned off gconf 
support, and no more warning.

So apparently the fix is to disable dbus and gconf when building emacs.

Thanks for your help,
Sam Sirlin
Comment 6 Ashish SHUKLA freebsd_committer freebsd_triage 2011-01-12 03:33:41 UTC
sam sirlin writes:
> Ashish SHUKLA wrote:
>> sam sirlin writes:
>> 
>>> Ashish SHUKLA wrote:
>>> 
>>>> Hi Sam,
>>>> 
>>>> My apologies for not replying to it earlier.
>>>> 
>>>> 
>>> That's ok, nothing critical. Just a bit annoying.
>>> 
>> 
>>>> Could you please provide few details about your FreeBSD environment setup:
>>>> 
>>>> 1. Do you use startx ? Or do you're using some kind of login manager like
>>>> xdm/gdm/kdm ?
>>>> 
>>>> 
>>> Just startx, with e16.
>>> 
>>>> 2. If you're using startx, could you please provide your .xinitrc ? Just
>>>> wanted to know if you're launching a DBus session daemon.
>>>> 
>>>> 
>>> I've attached my .xinitrc... evolved from a version used on sunos,
>>> solaris, FreeBSD 2 ...
>>> I do not explicitly launch dbus, but it seems to get started:
>>> 
>> 
>>> ps x | grep dbu
>>> 1536  ??  I      0:00.00 dbus-launch
>>> --autolaunch=ebc2647b26be515bda952e680000
>>> 1537  ??  Is     0:00.01 /usr/local/bin/dbus-daemon --fork
>>> --print-pid 5 --pri
>>> 
>> 
>>>> 3. Please mention the version of dbus, dbus-glib, and gconf, you're using.
>>>> 
>>>> 
>>> dir /var/db/pkg/ | grep dbus
>>> dbus-1.4.1/
>>> dbus-glib-0.88/
>>> e_dbus-1.0.0.b,1/
>>> eggdbus-0.6_1/
>>> 
>> 
>>> dir /var/db/pkg/ | grep gconf
>>> gconf-1.0.9_17/
>>> gconf2-2.32.0_2/
>>> 
>> Well, GNU Emacs depends on DBus now, and it tries to connect to a DBus session
>> bus, and when it is not able to find DBus session bus running, it launches
>> it. To get rid of that annoying warning, following is what I've in my
>> .xinitrc, and I don't get that warning:
>> 
>> #v+
>> #!/bin/sh
>> 
>> xrdb ~/.Xdefaults
>> xmodmap ~/.Xmodmap
>> gnome-screensaver&
>> exec dbus-launch --exit-with-session fluxbox 2>&1>$HOME/.xsession-errors
>> 
> I tried
> exec dbus-launch --exit-with-session e16


> which did stop the warning, but things seemed to run somewhat slower...


> Since dbus is apparently the trouble, I rebuilt emacs without dbus
> support, still the warning; so then in addition I turned off gconf
> support, and no more warning.


> So apparently the fix is to disable dbus and gconf when building emacs.


Yes, gconf brings in the DBus, and but I didn't know why are you experiencing
slowness. What precisely slowed down ? Emacs ? or everything ? Did you try
figuring out that, or it's just a perception.

I never experienced dbus slowing my window manager or other applications.

Also I'm wondering if you're interested in trying out editors/emacs-devel port?

Thanks
-- 
Ashish SHUKLA

âTous pour un, un pour tous, c'est notre deviseâ (Alexandre Dumas,
père, "Les Trois Mousquetaires", 1844)
Comment 7 Sam Sirlin 2011-01-14 05:51:32 UTC
Ashish SHUKLA wrote:
> sam sirlin writes:
>    
>> Ashish SHUKLA wrote:
>>      
>>> sam sirlin writes:
>>>
>>>        
>>>> Ashish SHUKLA wrote:
>>>>
>>>>          
>>>>> Hi Sam,
>>>>>
>>>>> My apologies for not replying to it earlier.
>>>>>
>>>>>
>>>>>            
>>>> That's ok, nothing critical. Just a bit annoying.
>>>>
>>>>          
>>>        
>>>>> Could you please provide few details about your FreeBSD environment setup:
>>>>>
>>>>> 1. Do you use startx ? Or do you're using some kind of login manager like
>>>>> xdm/gdm/kdm ?
>>>>>
>>>>>
>>>>>            
>>>> Just startx, with e16.
>>>>
>>>>          
>>>>> 2. If you're using startx, could you please provide your .xinitrc ? Just
>>>>> wanted to know if you're launching a DBus session daemon.
>>>>>
>>>>>
>>>>>            
>>>> I've attached my .xinitrc... evolved from a version used on sunos,
>>>> solaris, FreeBSD 2 ...
>>>> I do not explicitly launch dbus, but it seems to get started:
>>>>
>>>>          
>>>        
>>>> ps x | grep dbu
>>>> 1536  ??  I      0:00.00 dbus-launch
>>>> --autolaunch=ebc2647b26be515bda952e680000
>>>> 1537  ??  Is     0:00.01 /usr/local/bin/dbus-daemon --fork
>>>> --print-pid 5 --pri
>>>>
>>>>          
>>>        
>>>>> 3. Please mention the version of dbus, dbus-glib, and gconf, you're using.
>>>>>
>>>>>
>>>>>            
>>>> dir /var/db/pkg/ | grep dbus
>>>> dbus-1.4.1/
>>>> dbus-glib-0.88/
>>>> e_dbus-1.0.0.b,1/
>>>> eggdbus-0.6_1/
>>>>
>>>>          
>>>        
>>>> dir /var/db/pkg/ | grep gconf
>>>> gconf-1.0.9_17/
>>>> gconf2-2.32.0_2/
>>>>
>>>>          
>>> Well, GNU Emacs depends on DBus now, and it tries to connect to a DBus session
>>> bus, and when it is not able to find DBus session bus running, it launches
>>> it. To get rid of that annoying warning, following is what I've in my
>>> .xinitrc, and I don't get that warning:
>>>
>>> #v+
>>> #!/bin/sh
>>>
>>> xrdb ~/.Xdefaults
>>> xmodmap ~/.Xmodmap
>>> gnome-screensaver&
>>> exec dbus-launch --exit-with-session fluxbox 2>&1>$HOME/.xsession-errors
>>>
>>>        
>> I tried
>> exec dbus-launch --exit-with-session e16
>>      
>    
>> which did stop the warning, but things seemed to run somewhat slower...
>>      
>    
>> Since dbus is apparently the trouble, I rebuilt emacs without dbus
>> support, still the warning; so then in addition I turned off gconf
>> support, and no more warning.
>>      
>    
>> So apparently the fix is to disable dbus and gconf when building emacs.
>>      
> Yes, gconf brings in the DBus, and but I didn't know why are you experiencing
> slowness. What precisely slowed down ? Emacs ? or everything ? Did you try
> figuring out that, or it's just a perception.
>    
It seemed slower re-building emacs. Some tests with ls don't seem to 
show any difference however.
> I never experienced dbus slowing my window manager or other applications.
>
> Also I'm wondering if you're interested in trying out editors/emacs-devel port?
>    
I'll try it... seems to take some time to compile. The main thing I need 
is auctex, matlab, c modes.
Comment 8 mnln.l4 2011-03-01 05:53:18 UTC
The problem is related to dbus and gconf under X-window. I am using 
Windowmaker.
When .xinitrc is configured as following,
exec dbus-launch /usr/local/bin/wmaker

the warning "emacs:50055): GLib-WARNING **: In call to g_spawn_sync(), 
exit status of a child process was requested but SIGCHLD action was set 
to SIG_IGN and ECHILD was received by waitpid(), so exit status can't be 
returned. This is a bug in the program calling g_s pawn_sync(); either 
don't request the exit status, or don't set the SIGCHLD action." will stop.

However, if I do 'su' to become root and start emacs, emacs crashes. 
Recompile emacs form the port disabling gconf, and dbus solves this problem.

Linux seems to have the same issue. 
https://bugzilla.redhat.com/show_bug.cgi?id=654027

Thanks.

Comment 9 Martin Wilke freebsd_committer freebsd_triage 2014-02-27 15:05:46 UTC
State Changed
From-To: open->closed

feedback timeout.