|
From: Matthias G. <m_g...@wi...> - 2025-11-27 11:13:28
Attachments:
gdb.txt
|
Hi, I came across a segfault in the python bindings for GPIB. This is with the bitbang kernel module on a Raspberry Pi 4 running raspbian trixie and the python3-gpib package installed from Debian unstable. This can be reproduced like this: <http://intraserv.common.wiwa.loc/gitlab/><http://intraserv.common.wiwa.loc/gitlab/><http://intraserv.common.wiwa.loc/gitlab/><http://intraserv.common.wiwa.loc/gitlab/> <http://intraserv.common.wiwa.loc/gitlab/> sudo modprobe gpib_bitbang sudo /sbin/gpib_config export DEBUGINFOD_URLS="https://debuginfod.debian.net" gdb --args python3 -i (gdb) run (gdb) >>> import gpib (gdb) >>> dev = gpib.dev(0, 9) (gdb) >>> gpib.write(dev, ":ID?") (gdb) 8448 (gdb) >>> gpib.read(dev, 9999) (gdb) b'HP3488A\r\n (gdb) >>> gpib.read(9999, dev) libgpib: invalid descriptor Segmentation fault (gdb) bt Trying to read the wrong way should result in type error from python. I attached the backtrace; let me know if you need any additional info. -- Freundliche Grüsse / Best regards Matthias Geiger __________________________________________________________________ Matthias Geiger Werkstudent Forschung & Entwicklung/Research & Development Phone : +49-6441-609-3004 Email : m_g...@wi... URL : www.wiwa.de WIWA Wilhelm Wagner GmbH & Co. KG Gewerbestrasse 1-3, 35633 Lahnau, Germany Besucheranschrift/visitor address: Georg-Ohm-Strasse 12, 35633 Lahnau, Germany AG WETZLAR HRA 3223, Komplementär : Wagner GmbH (AG Wetzlar HRB 363) UST-ID Nr: / VAT-No: DE113745802 Geschäftsführer: Dipl.-Ing. (FH) Peter Turczak, Dipl.-Wirt.-Ing. Malte Weber |
|
From: Matthias G. <m_g...@wi...> - 2025-11-27 11:16:58
|
Am 27.11.25 um 11:55 schrieb Matthias Geiger: > > <http://intraserv.common.wiwa.loc/gitlab/><http://intraserv.common.wiwa.loc/gitlab/><http://intraserv.common.wiwa.loc/gitlab/><http://intraserv.common.wiwa.loc/gitlab/> > > <http://intraserv.common.wiwa.loc/gitlab/> > Whoops, ignore that. -- Freundliche Grüsse / Best regards Matthias Geiger __________________________________________________________________ Matthias Geiger Werkstudent Forschung & Entwicklung/Research & Development Phone : +49-6441-609-3004 Email : m_g...@wi... URL : www.wiwa.de WIWA Wilhelm Wagner GmbH & Co. KG Gewerbestrasse 1-3, 35633 Lahnau, Germany Besucheranschrift/visitor address: Georg-Ohm-Strasse 12, 35633 Lahnau, Germany AG WETZLAR HRA 3223, Komplementär : Wagner GmbH (AG Wetzlar HRB 363) UST-ID Nr: / VAT-No: DE113745802 Geschäftsführer: Dipl.-Ing. (FH) Peter Turczak, Dipl.-Wirt.-Ing. Malte Weber |
|
From: dave p. <dpe...@gm...> - 2025-11-28 09:23:53
|
Hi Matthias, There was a problem in the C library code. A fix has been pushed to the git <https://sourceforge.net/p/linux-gpib/git/ci/88183039ff0a4621af2b3ddd79186f089869208d/> . Please let me know if this works for you. cheers, -Dave On Thu, 27 Nov 2025 at 12:17, Matthias Geiger <m_g...@wi...> wrote: > Am 27.11.25 um 11:55 schrieb Matthias Geiger: > > > > <http://intraserv.common.wiwa.loc/gitlab/>< > http://intraserv.common.wiwa.loc/gitlab/>< > http://intraserv.common.wiwa.loc/gitlab/>< > http://intraserv.common.wiwa.loc/gitlab/> > > > > <http://intraserv.common.wiwa.loc/gitlab/> > > > Whoops, > > ignore that. > > -- > Freundliche Grüsse / Best regards > > Matthias Geiger > __________________________________________________________________ > Matthias Geiger > Werkstudent > Forschung & Entwicklung/Research & Development > > Phone : +49-6441-609-3004 > Email : m_g...@wi... > URL : www.wiwa.de > > WIWA Wilhelm Wagner GmbH & Co. KG > Gewerbestrasse 1-3, 35633 Lahnau, Germany > Besucheranschrift/visitor address: > Georg-Ohm-Strasse 12, 35633 Lahnau, Germany > > AG WETZLAR HRA 3223, Komplementär : Wagner GmbH (AG Wetzlar HRB 363) > UST-ID Nr: / VAT-No: DE113745802 > Geschäftsführer: Dipl.-Ing. (FH) Peter Turczak, Dipl.-Wirt.-Ing. Malte > Weber > > > > > _______________________________________________ > Linux-gpib-general mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linux-gpib-general > |
|
From: Matthias G. <m_g...@wi...> - 2025-11-28 10:07:57
|
Am 28.11.25 um 10:23 schrieb dave penkler: > Hi Matthias, > There was a problem in the C library code. A fix has been pushed to > the git > <https://sourceforge.net/p/linux-gpib/git/ci/88183039ff0a4621af2b3ddd79186f089869208d/>. > Please let me know if this works for you. > cheers, > -Dave > > Hi Dave, thanks for the quick fix. Rebuilding the userspace bindings does not lead to a segfault anymore: >>> gpib.read(9999, dev) libgpib: invalid descriptor libgpib: invalid descriptor Traceback (most recent call last): File "<python-input-4>", line 1, in <module> gpib.read(9999, dev) ~~~~~~~~~^^^^^^^^^^^ gpib.GpibError: read() failed: One or more arguments to the function call were invalid. It still complains about an invalid descriptor though. Thanks for the quick fix! I will cherry-pick this into Debian and then backport the whole package to current stable (trixie). -- Freundliche Grüsse / Best regards Matthias Geiger __________________________________________________________________ Matthias Geiger Werkstudent Forschung & Entwicklung/Research & Development Phone : +49-6441-609-3004 Email : m_g...@wi... URL : www.wiwa.de WIWA Wilhelm Wagner GmbH & Co. KG Gewerbestrasse 1-3, 35633 Lahnau, Germany Besucheranschrift/visitor address: Georg-Ohm-Strasse 12, 35633 Lahnau, Germany AG WETZLAR HRA 3223, Komplementär : Wagner GmbH (AG Wetzlar HRB 363) UST-ID Nr: / VAT-No: DE113745802 Geschäftsführer: Dipl.-Ing. (FH) Peter Turczak, Dipl.-Wirt.-Ing. Malte Weber |
|
From: dave p. <dpe...@gm...> - 2025-11-28 11:19:57
|
OK. We should probably suppress the "libgpib: invalid descriptor" message. I'll push the change. On Fri, 28 Nov 2025 at 11:08, Matthias Geiger <m_g...@wi...> wrote: > Am 28.11.25 um 10:23 schrieb dave penkler: > > Hi Matthias, > > There was a problem in the C library code. A fix has been pushed to > > the git > > < > https://sourceforge.net/p/linux-gpib/git/ci/88183039ff0a4621af2b3ddd79186f089869208d/ > >. > > Please let me know if this works for you. > > cheers, > > -Dave > > > > > Hi Dave, > > thanks for the quick fix. Rebuilding the userspace bindings does not > lead to a segfault anymore: > > >>> gpib.read(9999, dev) > libgpib: invalid descriptor > libgpib: invalid descriptor > Traceback (most recent call last): > File "<python-input-4>", line 1, in <module> > gpib.read(9999, dev) > ~~~~~~~~~^^^^^^^^^^^ > gpib.GpibError: read() failed: One or more arguments to the function > call were invalid. > > It still complains about an invalid descriptor though. Thanks for the > quick fix! I will cherry-pick this into Debian and then backport the > whole package > to current stable (trixie). > > -- > Freundliche Grüsse / Best regards > > Matthias Geiger > __________________________________________________________________ > Matthias Geiger > Werkstudent > Forschung & Entwicklung/Research & Development > > Phone : +49-6441-609-3004 > Email : m_g...@wi... > URL : www.wiwa.de > > WIWA Wilhelm Wagner GmbH & Co. KG > Gewerbestrasse 1-3, 35633 Lahnau, Germany > Besucheranschrift/visitor address: > Georg-Ohm-Strasse 12, 35633 Lahnau, Germany > > AG WETZLAR HRA 3223, Komplementär : Wagner GmbH (AG Wetzlar HRB 363) > UST-ID Nr: / VAT-No: DE113745802 > Geschäftsführer: Dipl.-Ing. (FH) Peter Turczak, Dipl.-Wirt.-Ing. Malte > Weber > > > > > _______________________________________________ > Linux-gpib-general mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linux-gpib-general > |