gschem: segfault in component selector

Bug #704829 reported by Peter TB Brett
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gEDA
Fix Released
Critical
Peter TB Brett
geda-gaf (Fedora)
Fix Released
Medium

Bug Description

From Red Hat bugzilla:

abrt 1.1.1 detected a crash.

architecture: x86_64
Attached file: backtrace
cmdline: gschem
component: geda-gaf
crash_function: __strlen_sse2
executable: /usr/bin/gschem
global_uuid: 0a8f7f48fda7b81f87624f86f26b3b5645a406b1
kernel: 2.6.33.5-112.fc13.x86_64
package: geda-gschem-1:1.6.0-3.fc13
rating: 4
reason: Process /usr/bin/gschem was killed by signal 11 (SIGSEGV)
release: Fedora release 13 (Goddard)

How to reproduce
-----
1. Open gschem
2. Place one component in the design (i.e. 'aop-std-1.sym', which is the first
one in the first group 'Basic Devices')
3. Then, in the component window, go to "In use" tab
4. Select that component (I think you just need to select _any_ component in
the list), and click on "refresh" button

This is reproducible with version 1.6.2.

Tags: gschem
Revision history for this message
In , Peque (peque-redhat-bugs) wrote :

abrt 1.1.1 detected a crash.

architecture: x86_64
Attached file: backtrace
cmdline: gschem
component: geda-gaf
crash_function: __strlen_sse2
executable: /usr/bin/gschem
global_uuid: 0a8f7f48fda7b81f87624f86f26b3b5645a406b1
kernel: 2.6.33.5-112.fc13.x86_64
package: geda-gschem-1:1.6.0-3.fc13
rating: 4
reason: Process /usr/bin/gschem was killed by signal 11 (SIGSEGV)
release: Fedora release 13 (Goddard)

How to reproduce
-----
1. Open gschem
2. Place one component in the design (i.e. 'aop-std-1.sym', which is the first one in the first group 'Basic Devices')
3. Then, in the component window, go to "In use" tab
4. Select that component (I think you just need to select _any_ component in the list), and click on "refresh" button

Revision history for this message
In , Peque (peque-redhat-bugs) wrote :

Created attachment 424273
File: backtrace

Revision history for this message
In , Chitlesh (chitlesh-redhat-bugs) wrote :

*** Bug 595001 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Peter (peter-redhat-bugs) wrote :
Revision history for this message
Peter TB Brett (peter-b) wrote :

Full steps to reproduce in 'stable-1.6' and 'master' branches:

- Run gschem
- Press 'i'
- Expand "Basic devices"
- Double-click "aop-std-1.sym"
- Click on page to place item
- Press 'Esc' twice
- Press 'i'
- Go to "In Use" tab
- Click "aop-std-1.sym"
- Click refresh button
- [boom]

Changed in geda:
status: New → Triaged
Revision history for this message
KaiMartin (kmk-familieknaak) wrote :

The segfault recipe works on debian/testing, too.

---<)kaimartin(>---

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Hi,
I can reproduce this one on Fedora 13 too (probably identical).
gdb bails out on not having debug info/symbols:

GNU gdb (GDB) Fedora (7.1-34.fc13)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/gschem...(no debugging symbols found)...done.
Missing separate debuginfos, use: debuginfo-install geda-gschem-1.6.0-3.fc13.i686

not very helpfull ;-(

And against all odds, I can not reproduce this on the winXP SP2 with gschem version 1.6.0.20091004 from the geda-gaf-1.6.0-4.exe installer.
The version on winXP keeps running with these steps.

Revision history for this message
Krzysztof Kościuszkiewicz (k-kosciuszkiewicz) wrote : Call sequence leading to segfault

It seems the situation unfolds as follows:
 * refresh button triggers compselect_callback_refresh_library
 * compselect->libtreeview model is updated first
 * update triggers compselect_callback_tree_selection_changed
 * callback checks the selection update came from library view
 * "buffer" property is correctly set to NULL
 * x_compselect_callback_response is triggered
 * "symbol" property is read
 * compselect_get_property doesn't check where the selection came from
 * in use tree view is queried for selection
 * stale pointer is returned and passed to o_complex_prepare_place

One solution I can think of is to block "changed" GtkTreeSelection event
handlers while updating the GtkTreeViews with new models.
I have tested this and it works, but maybe someone has a cleaner fix...

A memory leak is plugged in the second patch.

Changed in geda:
status: Triaged → In Progress
assignee: nobody → Peter TB Brett (peter-b)
Revision history for this message
Peter TB Brett (peter-b) wrote :

Patches committed to master and cherry-picked to stable-1.6.

Changed in geda:
status: In Progress → Fix Committed
Revision history for this message
In , Peter (peter-redhat-bugs) wrote :

This has now been fixed upstream, and a patches against gEDA/gaf 1.6.x are available.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

geda-gaf-1.6.2-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/geda-gaf-1.6.2-2.fc15

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Package geda-gaf-1.6.2-2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing geda-gaf-1.6.2-2.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/geda-gaf-1.6.2-2.fc15
then log in and leave karma (feedback).

Revision history for this message
In , Peque (peque-redhat-bugs) wrote :

Still having the same problem after updating to geda-gaf-1.6.2-2.fc15...

Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 13 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

geda-gaf-1.6.2-2.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.

Peter TB Brett (peter-b)
Changed in geda:
milestone: none → 1.7.1
milestone: 1.7.1 → none
Revision history for this message
In , Peter (peter-redhat-bugs) wrote :

> This has now been fixed upstream, and a patches against gEDA/gaf 1.6.x are
> available.

It this fix *didn't* make it into the 1.6.2 release. This bug should be re-opened.

Since it is unlikely that we (upstream) will release a 1.6.3 release soon, I recommend that Fedora manually apply this patch to the 1.6.2 tarball:

http://git.gpleda.org/?p=gaf.git;a=commitdiff_plain;h=334307f0c4f68f704eec422af077b9e32d37b177;hp=a30f00bbee18ad5140616ad6459365cb48b03ee7 (or http://goo.gl/uW3EB)

Peter TB Brett (peter-b)
Changed in geda:
milestone: none → 1.7.1
Peter TB Brett (peter-b)
Changed in geda:
status: Fix Committed → Fix Released
Changed in geda-gaf (Fedora):
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.