Bug 944 - Crash on startup in GIOSocket::write
Status:
RESOLVED FIXED
Component:
Core
Version:
1.9.2
Hardware:
PC Linux
Importance:
P5 major
Target Milestone:
---
Assignee:
Rob Caelers
URL:
Depends on:
Blocks:
Reported:
Nov 22 2010 08:55:07 UTC
by:
Carlo de Wolf
Modified:
Nov 25 2010 21:46:29 UTC
WhoWhenWhatRemovedAdded
Rob CaelersNov 25 2010 21:46:29 UTCstatusNEWRESOLVED
resolutionFIXED
Description
Carlo de Wolf  Nov 22 2010 08:55:07 UTC
workrave-1.9.2-1.fc13.i686

#0  0x00789f9a in IA__g_socket_send (socket=0x3a33322e, buffer=0x83b8e98 "", 
    size=197, cancellable=0x0, error=0xbfffee78) at gsocket.c:1771
#1  0x080e0521 in GIOSocket::write (this=0x82574c0, buf=0x83b8e98, count=197, 
    bytes_written=@0xbfffeecc) at GIOSocketDriver.cc:259
#2  0x080dc177 in DistributionSocketLink::send_packet_except (this=0x82558f0, 
    packet=..., client=0x0) at DistributionSocketLink.cc:1003
#3  0x080dc1ac in DistributionSocketLink::send_packet_broadcast (this=
    0x82558f0, packet=...) at DistributionSocketLink.cc:978
#4  0x080deb62 in DistributionSocketLink::broadcast_client_message (this=
    0x82558f0, dsid=DCM_STATS, buffer=...) at DistributionSocketLink.cc:489
#5  0x080da3a2 in DistributionManager::broadcast_client_message (this=
    0x8255568, id=DCM_STATS, buffer=...) at DistributionManager.cc:350
#6  0x080d729b in Statistics::day_to_remote_history (this=0x825b448, stats=
    0x825b718) at Statistics.cc:213
#7  0x080d78c1 in Statistics::start_new_day (this=0x825b448)
    at Statistics.cc:157
#8  0x080d07a0 in Core::process_timers (this=0x824dc50) at Core.cc:1107
#9  0x080d236e in Core::heartbeat (this=0x824dc50) at Core.cc:878
#10 0x0809c761 in GUI::on_timer (this=0x81daf18) at GUI.cc:300
#11 0x0809ceab in GUI::main (this=0x81daf18) at GUI.cc:223
#12 0x080b6c90 in run (argc=1, argv=0xbffff294) at main.cc:62
#13 0x080b6cdd in main (argc=135137138, argv=0x80e07c4) at main.cc:79
Comment 1
Carlo de Wolf  Nov 23 2010 09:47:50 UTC
I managed to get past the initial crash by disabling networking by setting gconf option apps->workrave->distribution->enabled to false.

Now I deleted all hosts that were in there and I try to re-enable networking by specifying an ip-address. The following is logged, followed by a crash:
[23/11/2010 09:41:32] Connecting to (null).
Comment 2
Carlo de Wolf  Nov 23 2010 09:53:17 UTC
Forgot to mention: using Fedora 13

If I add the hostname to /etc/hosts and use that instead of the ip, I get:
(workrave:3827): GLib-GIO-CRITICAL **: g_inet_address_get_family: assertion `G_IS_INET_ADDRESS (address)' failed

Plus the 'Connecting to (null)'.
Comment 3
Carlo de Wolf  Nov 23 2010 10:02:14 UTC
192.168.1.18 is the machine giving trouble running Fedora 13.
192.168.1.23 is another machine running Ubuntu 10.04.

[23/11/2010 09:52:57] Connecting to 192.168.1.18:27273.
[23/11/2010 09:52:57] Client 192.168.1.18:27273 connected.
[23/11/2010 09:52:57] Client 83fd97fa76f910385422c2da4ceb7bb5:27273 is welcoming us.
[23/11/2010 09:52:58] Client 83fd97fa76f910385422c2da4ceb7bb5:27273 is now master.
[23/11/2010 09:52:58] Requesting master status from 83fd97fa76f910385422c2da4ceb7bb5:27273.
[23/11/2010 09:52:58] Client 192.168.1.23:27273 is now the new master.
[23/11/2010 09:52:58] I'm now master.
[23/11/2010 09:53:17] Rejecting master request from client 83fd97fa76f910385422c2da4ceb7bb5:27273.
[23/11/2010 09:53:22] Acknowledging master request from client 83fd97fa76f910385422c2da4ceb7bb5:27273.
[23/11/2010 09:53:55] Requesting master status from 83fd97fa76f910385422c2da4ceb7bb5:27273.
[23/11/2010 09:53:55] Client 192.168.1.23:27273 is now the new master.
[23/11/2010 09:53:55] I'm now master.

Speaking from complete ignorance it almost looks like IPv6 is getting in the way.
Comment 4
Rob Caelers  Nov 24 2010 22:28:00 UTC
Thanks for you thorough analysis.

- The 'connecting (null)' seems harmless, but is now fixed. 
- The crash in GIOSocket::write is fixed (uninitialized variable).
- Workrave now supports ipv6 (Workrave choked on the colons)

One crash remaining in GIOSocket.
Comment 5
Rob Caelers  Nov 25 2010 21:46:29 UTC
Fixed. Thanks!