Re: Segfault in python bindings

dave penkler <[email protected]> Fri, 28 Nov 2025 12:19:31 +0100
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <CAL=kjP3cgEmqfMq6aALREwG-Sg3HMBorD337qVz0g4aS9m0VEg@mail.gmail.com>
--===============1844107477529504650==
Content-Type: multipart/alternative; boundary="000000000000778e730644a5ce9b"

--000000000000778e730644a5ce9b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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 <[email protected]> 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/88183039ff0a4621af2b3ddd79186=
f089869208d/
> >.
> > 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=C3=BCsse / Best regards
>
> Matthias Geiger
> __________________________________________________________________
> Matthias Geiger
> Werkstudent
> Forschung & Entwicklung/Research & Development
>
> Phone : +49-6441-609-3004
> Email : [email protected]
> 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=C3=A4r : Wagner GmbH (AG Wetzlar HRB 363)
> UST-ID Nr: / VAT-No: DE113745802
> Gesch=C3=A4ftsf=C3=BChrer: Dipl.-Ing. (FH) Peter Turczak, Dipl.-Wirt.-Ing=
. Malte
> Weber
>
>
>
>
> _______________________________________________
> Linux-gpib-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
>

--000000000000778e730644a5ce9b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">OK. We should probably suppress the=C2=A0 &quot;libgpib: i=
nvalid descriptor&quot; message.<div>I&#39;ll push the change.</div><div><b=
r><div><br></div></div></div><br><div class=3D"gmail_quote gmail_quote_cont=
ainer"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, 28 Nov 2025 at 11:08, =
Matthias Geiger &lt;<a href=3D"mailto:[email protected]">[email protected]</a=
>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px=
 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am =
28.11.25 um 10:23 schrieb dave penkler:<br>
&gt; Hi Matthias,<br>
&gt; There was a problem in the C library=C2=A0code. A fix has been pushed =
to <br>
&gt; the git <br>
&gt; &lt;<a href=3D"https://sourceforge.net/p/linux-gpib/git/ci/88183039ff0=
a4621af2b3ddd79186f089869208d/" rel=3D"noreferrer" target=3D"_blank">https:=
//sourceforge.net/p/linux-gpib/git/ci/88183039ff0a4621af2b3ddd79186f0898692=
08d/</a>&gt;.<br>
&gt; Please let me know if this works for you.<br>
&gt; cheers,<br>
&gt; -Dave<br>
&gt;<br>
&gt;<br>
Hi Dave,<br>
<br>
thanks for the quick fix. Rebuilding the userspace bindings does not <br>
lead to a segfault anymore:<br>
<br>
=C2=A0&gt;&gt;&gt; gpib.read(9999, dev)<br>
libgpib: invalid descriptor<br>
libgpib: invalid descriptor<br>
Traceback (most recent call last):<br>
=C2=A0=C2=A0 File &quot;&lt;python-input-4&gt;&quot;, line 1, in &lt;module=
&gt;<br>
=C2=A0=C2=A0 =C2=A0 gpib.read(9999, dev)<br>
=C2=A0=C2=A0 =C2=A0 ~~~~~~~~~^^^^^^^^^^^<br>
gpib.GpibError: read() failed: One or more arguments to the function <br>
call were invalid.<br>
<br>
It still complains about an invalid descriptor though. Thanks for the <br>
quick fix! I will cherry-pick this into Debian and then backport the <br>
whole package<br>
to current stable (trixie).<br>
<br>
-- <br>
Freundliche Gr=C3=BCsse / Best regards<br>
<br>
Matthias Geiger<br>
__________________________________________________________________<br>
Matthias Geiger<br>
Werkstudent<br>
Forschung &amp; Entwicklung/Research &amp; Development<br>
<br>
Phone : +49-6441-609-3004<br>
Email : <a href=3D"mailto:[email protected]" target=3D"_blank">m_geiger@wiwa=
.de</a><br>
URL=C2=A0 =C2=A0: <a href=3D"http://www.wiwa.de" rel=3D"noreferrer" target=
=3D"_blank">www.wiwa.de</a><br>
<br>
WIWA Wilhelm Wagner GmbH &amp; Co. KG<br>
Gewerbestrasse 1-3, 35633 Lahnau, Germany<br>
Besucheranschrift/visitor address:<br>
Georg-Ohm-Strasse 12, 35633 Lahnau, Germany<br>
<br>
AG WETZLAR HRA 3223, Komplement=C3=A4r : Wagner GmbH (AG Wetzlar HRB 363)<b=
r>
UST-ID Nr: / VAT-No: DE113745802<br>
Gesch=C3=A4ftsf=C3=BChrer: Dipl.-Ing. (FH) Peter Turczak, Dipl.-Wirt.-Ing. =
Malte Weber<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Linux-gpib-general mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blan=
k">[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/linux-gpib-general"=
 rel=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/l=
istinfo/linux-gpib-general</a><br>
</blockquote></div>

--000000000000778e730644a5ce9b--


--===============1844107477529504650==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============1844107477529504650==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general

--===============1844107477529504650==--