Bug 434539 - Synergy segaulting in libstdc++
Synergy segaulting in libstdc++
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: synergy (Show other bugs)
9
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Matthias Saou
Fedora Extras Quality Assurance
:
: 447696 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-22 11:37 EST by Paul Black
Modified: 2008-06-03 03:36 EDT (History)
3 users (show)

See Also:
Fixed In Version: 1.3.1-9.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-03 03:32:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Backtrace from segfault (910 bytes, text/plain)
2008-03-12 05:10 EDT, Paul Black
no flags Details
Backtrace from segfault of synergyc (!client!) (2.83 KB, text/plain)
2008-05-19 14:19 EDT, Stefan Neufeind
no flags Details
First attempt at fixing this (2.40 KB, patch)
2008-05-30 18:19 EDT, Hans de Goede
no flags Details | Diff

  None (edit)
Description Paul Black 2008-02-22 11:37:11 EST
Description of problem:
14:09:54 kernel: synergys[17635]: segfault at 18 ip 37b066b6c8 sp 7fff0e7742f8
error 4 in libstdc++.so.6.0.10[37b0600000+ee000]
14:17:22 kernel: synergys[20880]: segfault at 18 ip 37b066b6c8 sp 7fffed9db558
error 4 in libstdc++.so.6.0.10[37b0600000+ee000]
16:14:30 kernel: synergys[20933]: segfault at 18 ip 37b066b6c8 sp 7fffd90a2c28
error 4 in libstdc++.so.6.0.10[37b0600000+ee000]
16:15:32 kernel: synergys[21087]: segfault at 18 ip 37b066b6c8 sp 7fffcb7df368
error 4 in libstdc++.so.6.0.10[37b0600000+ee000]
16:26:43 kernel: synergys[21206]: segfault at 18 ip 37b066b6c8 sp 7fffea500088
error 4 in libstdc++.so.6.0.10[37b0600000+ee000]
16:34:17 kernel: synergys[21255]: segfault at 18 ip 37b066b6c8 sp 7fffdc170cf8
error 4 in libstdc++.so.6.0.10[37b0600000+ee000]


Version-Release number of selected component (if applicable):
synergy-1.3.1-5.fc8.x86_64

How reproducible:
Will run for a while but happens regularly. Didn't happen under Fedora 8

Steps to Reproduce:
1. Run synergys. Have client connect
2. Use synergy


Actual results:
synergys keeps running.

Expected results:
synergys segfaults.

Additional info:
I did recompile synergy under GCC 4.3 (required some header files to be added)
but problem remained.
Comment 1 Matthias Saou 2008-02-24 08:54:32 EST
Can you try with the rebuild from yesterday? I doubt it'll fix the problem if a
local rebuild didn't, but you never know...

If the problem persists, please install synergy-debuginfo and gdb, run it after
"ulimit -c unlimited", then run "gdb synergys core.xyz" enter "bt" and paste
here the complete backtrace you get.
Comment 2 Paul Black 2008-03-12 05:10:08 EDT
Created attachment 297741 [details]
Backtrace from segfault
Comment 3 Paul Black 2008-03-25 05:19:30 EDT
I think this may be caused by copying data to the clipboard in Windows.

If I select something in Outlook or Firefox and hit CTRL-C, when the mouse moves
back to the Linux screen, synergys segfaults.
Comment 4 Bug Zapper 2008-05-14 01:34:52 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Stefan Neufeind 2008-05-15 07:55:43 EDT
Hmm, I've lately seen synergyc crashing occasionally since upgrading to Fedora
9. Not sure if this is related. If I manage to get something reproducable, I'll
see to catch a backtrace ...
Comment 6 Stefan Neufeind 2008-05-19 14:19:59 EDT
Created attachment 305988 [details]
Backtrace from segfault of synergyc (!client!)
Comment 7 Stefan Neufeind 2008-05-19 14:21:39 EDT
Please see attached backtrace from the client. This happened to me similar over
the last few days. synergyc was always started with "-f" to make it easier to
debug something.

While I've been able to encounter the segfault again, unfortunately I still lack
a means to easily reproduce this crash (e.g. for further checking or confirm fix).
Comment 8 Matthias Saou 2008-05-30 12:10:39 EDT
*** Bug 447696 has been marked as a duplicate of this bug. ***
Comment 9 Matthias Saou 2008-05-30 12:20:31 EDT
Things are looking quite bad, as synergy's development seems to have stopped
completely. I've looked at a few upstream bugreports, and found some which are
very similar to this one, but unfortunately none have fixes posted. From the
synergy website, the "Known Bugs" link goes to a pretty alarming list :
http://sourceforge.net/tracker/?func=browse&group_id=59275&atid=490467

As I lack knowledge to fix the current issues, either this would need to be
looked into by someone more knowledgeable (which is why I'm cc'ing Hans, in case
he can have a look... but it's C++... ;-)), or having synergy in Fedora should
be reconsidered, given its current status (although I personally think it would
be too bad to have it removed, as I still use it and haven't seen these crashes
yet).
Comment 10 Hans de Goede 2008-05-30 18:18:33 EDT
I think I've found the cause (and fixed) the backtrace from comment #2, I say I
think, as I don't have a working synergy setup myself, so the only checking of
my fix I've done is checked that it still compiles.

Once its done buidling you can download a test verison of the fixed packages here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=637490

For those curious I'll also attach my patch, It fixes a classic case of using an
iterator after erasing the element that the iterator referenced to before doing
the erase. I wish c++ programmers would learn to not do this, as I've seen this
bug too often.
Comment 11 Hans de Goede 2008-05-30 18:19:15 EDT
Created attachment 307244 [details]
First attempt at fixing this
Comment 12 Paul Black 2008-06-02 04:08:18 EDT
The fix works for me.

Cheers
Comment 13 Stefan Neufeind 2008-06-02 04:18:41 EDT
Hasn't crashed here so far :-) Looks better imho. Might take a few more days to
be completely sure all errors are gone, but then we could easily reopen the bug
if needed.

Works. Great work, Hans!
Comment 14 Hans de Goede 2008-06-02 05:43:53 EDT
Good to hear my time was invested well :)

So shall I push an update of synergy containing this fix?
Comment 15 Stefan Neufeind 2008-06-02 05:51:46 EDT
From my point of view the patch seems to be fine, and prevents occassional
crashes (2-3 times per day for me). Please go for it.
Comment 16 Matthias Saou 2008-06-02 05:53:28 EDT
My hero! :-)
Feel free to push the update if you want, otherwise just say so and I'll do it
myself based on your patch. Thanks a lot, Hans!
Comment 17 Hans de Goede 2008-06-02 06:02:02 EDT
Fixed version building for devel, F-9 and F-8 (not sure if its needed for F-8,
seems to be triggered by changes in gcc-4.3's stdlibc++, but can't hurt).

Will push as update once done building.
Comment 18 Stefan Neufeind 2008-06-02 06:06:22 EDT
Any chance you could also submit that upstream? :-)
Comment 19 Paul Black 2008-06-02 06:09:47 EDT
I never encountered the problem on F-8.

Once again, thanks for the good work.
Comment 20 Fedora Update System 2008-06-02 06:15:58 EDT
synergy-1.3.1-8.fc9 has been submitted as an update for Fedora 9
Comment 21 Hans de Goede 2008-06-02 15:37:51 EDT
(In reply to comment #18)
> Any chance you could also submit that upstream? :-)

Good point, this has lead me to going to upstreams patch tracker, which has
quite a few patches queued which were never applied as upstream seems, well
basicly dead :(

Anyways I've taken 2 bugfix patches from the tracker, which fix bugs which I was
able to reproduce and applied them to the Fedora package, for good measure I
also checked the Debian packages and took 2 manpages from there, so now instead
of synergy-1.3.1-8.fc9 I proudly present you synergy-1.3.1-9.fc9:
* Mon Jun 02 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 1.3.1-9
- Drop no longer needed patch0, stop regenerating autoxxx files
- Apply the following bug fixes from upstream's bug tracker:
  -off by one bugfix to X11 selection (fixes copy and paste by selection)
  -call DPMSOn() when entering screen to make sure powersaving mode is canceled
   on X11 client systems when the fake mouse / keyb become active
- Add manpages (courtesy of Debian)

There alos is the following bugfix in upstream, but I couldn't reproduce, I
guess this only happens with windows servers:
-Fix modifier keys getting stuck down when switching between screens using
 a hotkey combination

Applying that to our packages thus will be of little use. Also potentially
interesting are the following new features patches:
-add option to leave focus to last focussed app when leaving screen, this
 is usefull for example to keep remote controls working with mythtv when
 the synergy cursor is on a different screen
-add options to only switch screens when the mouse pointer leaves a screen
 and one of shift/ctrl/alt (configurable) is pressed

I don't use synergy much myself, do this features sound usefull to you?

Anyways now pushing synergy-1.3.1-8 to FC-9 and FC-8.
Comment 22 Fedora Update System 2008-06-02 15:54:31 EDT
synergy-1.3.1-9.fc9 has been submitted as an update for Fedora 9
Comment 23 Fedora Update System 2008-06-02 15:55:27 EDT
synergy-1.3.1-9.fc8 has been submitted as an update for Fedora 8
Comment 24 Max Rydahl Andersen 2008-06-03 02:50:04 EDT
(In reply to comment #21)
> (In reply to comment #18)
> Applying that to our packages thus will be of little use. Also potentially
> interesting are the following new features patches:
> -add option to leave focus to last focussed app when leaving screen, this
>  is usefull for example to keep remote controls working with mythtv when
>  the synergy cursor is on a different screen
> -add options to only switch screens when the mouse pointer leaves a screen
>  and one of shift/ctrl/alt (configurable) is pressed
> 
> I don't use synergy much myself, do this features sound usefull to you?

If the patches won't be available in the windows or mac clients and become 
incompatible with Fedora's synergy then I don't think these are usefull. 
> Anyways now pushing synergy-1.3.1-8 to FC-9 and FC-8.

Comment 25 Fedora Update System 2008-06-03 03:32:32 EDT
synergy-1.3.1-9.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 26 Fedora Update System 2008-06-03 03:36:20 EDT
synergy-1.3.1-9.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.