lyx segfaults upon opening a .lyx file

Bug #2069792 reported by J B
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lyx (Ubuntu)
New
Undecided
Unassigned

Bug Description

Running:
$ lyx mlfriendsonly2.lyx
gives a segfault. Other lyx files work fine, and this file used to work fine last year.

1) $ lsb_release -rd
No LSB modules are available.
Description: Ubuntu 24.04 LTS
Release: 24.04

2) $ apt-cache policy lyx
lyx:
  Installed: 2.4.0~RC3-1build4
  Candidate: 2.4.0~RC3-1build4
  Version table:
 *** 2.4.0~RC3-1build4 500
        500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        100 /var/lib/dpkg/status

3) the GUI to open
4) segfault

I enabled apport following the instructions (enabled=1, commenting out problem_types line, but apport does not pop up). So I am using valgrind and gdb and attaching them below.

Strangely this crash also caused wayland to crash, before I uninstalled snapd.

Revision history for this message
J B (buchner-johannes) wrote :
Revision history for this message
J B (buchner-johannes) wrote :

G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log $(which lyx) /mnt/data/daten/PostDoc2/research/stats/mlfriends-analysis/pres/mlfriendsonly2.lyx

Revision history for this message
J B (buchner-johannes) wrote :

looks like an infinite stack? (gdb never completes "backtrace full")

Revision history for this message
J B (buchner-johannes) wrote :

other gdb commands from https://wiki.ubuntu.com/Backtrace

"thread apply all backtrace" hangs indefinitely and does not complete.

Revision history for this message
J B (buchner-johannes) wrote :

boot log from journalctl -xb

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

Hello,

Thanks for the very complete bug report. I cannot reproduce any crash loading the file from command line.

I do not see any error in the valgrind log, do you see one?

Finally, gdb seems to show an infinite recursion in regex, but there is no way to see where it starts.

Is is possible fr you to try to bisect your file, that is to find the smaller possible file that triggers the issue?

Note that I neither have the right textclass (which is probably harmless) nor the bibtex database (which might trigger regex issues). Could you provide this bibtex database?

Revision history for this message
J B (buchner-johannes) wrote :

I was able to narrow the issue down to a bibtex entry with over 1000 co-authors:
https://ui.adsabs.harvard.edu/abs/2023PhRvX..13a1048A/exportcitation

I am using the imsart-nameyear bibtex style from here
https://github.com/vtex-soft/texsupport.ims-aos/

Running bibtex is slow, but does finish.

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

Thanks, this is very helpful.

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

Can you share the bibtex file or just the bad entry? The link that you give here does not have the 1000 authors.

Revision history for this message
J B (buchner-johannes) wrote :
Download full text (31.1 KiB)

Here it is:

@ARTICLE{2023PhRvX..13a1048A,
       author = {{Abbott}, R. and {Abbott}, T.~D. and {Acernese}, F. and {Ackley}, K. and {Adams}, C. and {Adhikari}, N. and {Adhikari}, R.~X. and {Adya}, V.~B. and {Affeldt}, C. and {Agarwal}, D. and {Agathos}, M. and {Agatsuma}, K. and {Aggarwal}, N. and {Aguiar}, O.~D. and {Aiello}, L. and {Ain}, A. and {Ajith}, P. and {Akutsu}, T. and {de Alarc{\'o}n}, P.~F. and {Akcay}, S. and {Albanesi}, S. and {Allocca}, A. and {Altin}, P.~A. and {Amato}, A. and {Anand}, C. and {Anand}, S. and {Ananyeva}, A. and {Anderson}, S.~B. and {Anderson}, W.~G. and {Ando}, M. and {Andrade}, T. and {Andres}, N. and {Andri{\'c}}, T. and {Angelova}, S.~V. and {Ansoldi}, S. and {Antelis}, J.~M. and {Antier}, S. and {Antonini}, F. and {Appert}, S. and {Arai}, Koji and {Arai}, Koya and {Arai}, Y. and {Araki}, S. and {Araya}, A. and {Araya}, M.~C. and {Areeda}, J.~S. and {Ar{\`e}ne}, M. and {Aritomi}, N. and {Arnaud}, N. and {Arogeti}, M. and {Aronson}, S.~M. and {Arun}, K.~G. and {Asada}, H. and {Asali}, Y. and {Ashton}, G. and {Aso}, Y. and {Assiduo}, M. and {Aston}, S.~M. and {Astone}, P. and {Aubin}, F. and {Austin}, C. and {Babak}, S. and {Badaracco}, F. and {Bader}, M.~K.~M. and {Badger}, C. and {Bae}, S. and {Bae}, Y. and {Baer}, A.~M. and {Bagnasco}, S. and {Bai}, Y. and {Baiotti}, L. and {Baird}, J. and {Bajpai}, R. and {Ball}, M. and {Ballardin}, G. and {Ballmer}, S.~W. and {Balsamo}, A. and {Baltus}, G. and {Banagiri}, S. and {Bankar}, D. and {Barayoga}, J.~C. and {Barbieri}, C. and {Barish}, B.~C. and {Barker}, D. and {Barneo}, P. and {Barone}, F. and {Barr}, B. and {Barsotti}, L. and {Barsuglia}, M. and {Barta}, D. and {Bartlett}, J. and {Barton}, M.~A. and {Bartos}, I. and {Bassiri}, R. and {Basti}, A. and {Bawaj}, M. and {Bayley}, J.~C. and {Baylor}, A.~C. and {Bazzan}, M. and {B{\'e}csy}, B. and {Bedakihale}, V.~M. and {Bejger}, M. and {Belahcene}, I. and {Benedetto}, V. and {Beniwal}, D. and {Bennett}, T.~F. and {Bentley}, J.~D. and {Benyaala}, M. and {Bergamin}, F. and {Berger}, B.~K. and {Bernuzzi}, S. and {Berry}, C.~P.~L. and {Bersanetti}, D. and {Bertolini}, A. and {Betzwieser}, J. and {Beveridge}, D. and {Bhandare}, R. and {Bhardwaj}, U. and {Bhattacharjee}, D. and {Bhaumik}, S. and {Bilenko}, I.~A. and {Billingsley}, G. and {Bini}, S. and {Birney}, R. and {Birnholtz}, O. and {Biscans}, S. and {Bischi}, M. and {Biscoveanu}, S. and {Bisht}, A. and {Biswas}, B. and {Bitossi}, M. and {Bizouard}, M. -A. and {Blackburn}, J.~K. and {Blair}, C.~D. and {Blair}, D.~G. and {Blair}, R.~M. and {Bobba}, F. and {Bode}, N. and {Boer}, M. and {Bogaert}, G. and {Boldrini}, M. and {Bonavena}, L.~D. and {Bondu}, F. and {Bonilla}, E. and {Bonnand}, R. and {Booker}, P. and {Boom}, B.~A. and {Bork}, R. and {Boschi}, V. and {Bose}, N. and {Bose}, S. and {Bossilkov}, V. and {Boudart}, V. and {Bouffanais}, Y. and {Bozzi}, A. and {Bradaschia}, C. and {Brady}, P.~R. and {Bramley}, A. and {Branch}, A. and {Branchesi}, M. and {Brandt}, J. and {Brau}, J.~E. and {Breschi}, M. and {Briant}, T. and {Briggs}, J.~H. and {Brillet}, A. and {Brinkmann}, M. and {Brockill}, P. and {Brooks}, A.~F. and {Brooks}, J. and {Brown}, D.~D. and {Brunet...

Revision history for this message
J B (buchner-johannes) wrote :

FYI, the bst style authors do not intend to change anything https://github.com/vtex-soft/texsupport.ims-aos/issues/5

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

Thanks for the example, the bug should be fixed in LyX 2.5.2.

Note that the bst file is irrelevant here, the issue was with LyX's own parsing of the bib file.

Revision history for this message
J B (buchner-johannes) wrote : Re: [Bug 2069792] Re: lyx segfaults upon opening a .lyx file

Thanks Jean-Marc!

On 16.07.24 16:27, Jean-Marc Lasgouttes wrote:
> Thanks for the example, the bug should be fixed in LyX 2.5.2.
>
> Note that the bst file is irrelevant here, the issue was with LyX's own
> parsing of the bib file.
>

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.