Menu

#1228 segfault whith jack in libthread_db

v0.46
pending-works-for-me
nobody
5
2017-07-06
2016-01-24
kubriel
No
gdb pd
GNU gdb (GDB) 7.10
.............
Type "apropos word" to search for commands related to "word"...
Reading symbols from pd...(no debugging symbols found)...done.
(gdb) run -jack
Starting program: /usr/local/bin/pd -jack
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00000000004b9e5e in jack_open_audio ()
#2  0x000000000046b29e in sys_reopen_audio ()
#3  0x0000000000462591 in sys_main ()
#4  0x00007ffff6c2f610 in __libc_start_main () from /usr/lib/libc.so.6
#5  0x0000000000411bc9 in _start ()
(gdb) watchdog: signaling pd...
kill
Kill the program being debugged? (y or n) y
watchdog: signaling pd...

i cannot reproduce it anywhere else, but i dont know where can be the problem in this not very fresh arch linux installation(it worked before).
pd from git, but its same with pd from repo.
kernel 4.2.5-1-ARCH

just to let you know..

Related

Bugs: #1228

Discussion

  • IOhannes m zmölnig

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,5 @@
    +
    +~~~
     gdb pd
     GNU gdb (GDB) 7.10
     .............
    @@ -21,6 +23,7 @@
     kill
     Kill the program being debugged? (y or n) y
     watchdog: signaling pd...
    +~~~
    
     i cannot reproduce it anywhere else, but i dont know where can be the problem in this not very fresh arch linux installation(it worked before).
     pd from git, but its same with pd from repo.
    
     
  • IOhannes m zmölnig

    so it crashes on startup, without you doing anything? (in the gdb-session we only see that you start Pd and that it then crashes; n oclue what you are doing in Pd)

    do other jack-based applications work?

     
  • IOhannes m zmölnig

    also: is jackd running? (and which version of jackd are you using?)

     
  • Anonymous

    Anonymous - 2016-01-24

    i did nothing, pd window was not even opened.
    jackd is running. it is 1.9.10-3. other applications running fine.

     
  • Anonymous

    Anonymous - 2016-02-11

    I can confirm that. I'm also on archlinux:

    kernel: linux-rt 4.1.13-rt15-1-rt
    Pd-0.46.7
    jackdmp 1.9.10

    2016-01-24 12:27 GMT+01:00 kubriel kubriel@users.sf.net:


    Status: open
    Group: v0.46
    Labels: segfault jack
    Created: Sun Jan 24, 2016 11:27 AM UTC by kubriel
    Last Updated: Sun Jan 24, 2016 11:27 AM UTC
    Owner: nobody

    gdb pd
    GNU gdb (GDB) 7.10
    .............
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from pd...(no debugging symbols found)...done.
    (gdb) run -jack
    Starting program: /usr/local/bin/pd -jack
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".

    Program received signal SIGSEGV, Segmentation fault.
    0x0000000000000000 in ?? ()
    (gdb) bt
    0 0x0000000000000000 in ?? () 1 0x00000000004b9e5e in jack_open_audio () 2
    0x000000000046b29e in sys_reopen_audio () 3 0x0000000000462591 in
    sys_main () 4 0x00007ffff6c2f610 in __libc_start_main () from
    /usr/lib/libc.so.6 5 0x0000000000411bc9 in _start ()

    (gdb) watchdog: signaling pd...
    kill
    Kill the program being debugged? (y or n) y
    watchdog: signaling pd...

    i cannot reproduce it anywhere else, but i dont know where can be the
    problem in this not very fresh arch linux installation(it worked before).
    pd from git, but its same with pd from repo.
    kernel 4.2.5-1-ARCH

    just to let you know..

    Sent from sourceforge.net because pd-dev@lists.iem.at is subscribed to
    https://sourceforge.net/p/pure-data/bugs/

    To unsubscribe from further messages, a project admin can change settings
    at https://sourceforge.net/p/pure-data/admin/bugs/options. Or, if this is
    a mailing list, you can unsubscribe from the mailing list.


    Pd-dev mailing list
    Pd-dev@lists.iem.at
    http://lists.puredata.info/listinfo/pd-dev

     

    Related

    Bugs: #1228

  • Xavier Miller

    Xavier Miller - 2016-02-12

    Hi!

    Same problem here. pd-0.46-7 segfaults with jack-1.9.10 on Gentoo Linux (x86_64).
    I tried with jackd and jack-dbus.

    If I disable jack from the configure script, I can run pd with ALSA.
    jack applications are OK.

     
  • Xavier Miller

    Xavier Miller - 2016-02-17

    PD 0.45 is OK. I see that null buffer tests are added in src/s_audio_jack.c. Maybe there is one missing test or bracket there (see my diff).

     
  • Anonymous

    Anonymous - 2016-05-17

    There's a suggested fix in the Arch Linux bug report here:
    https://bugs.archlinux.org/task/45006

    This suggests, that something is wrong with the CFLAGS/CPPFLAGS

     
  • IOhannes m zmölnig

    to me this looks like the arch-recipe for building Pd is broken (rather than a problem with Pd itself).

    in any case, it would be useful to know what those build-flags hacks actually change (all instructions linked to from the arch-fix only involve tweaking the arch-buildprocess;).

    i suspect that arch by default enables some hardening flags during compilation, and the maintainers of the arch packages for Pd haven't disabled this.

     
  • IOhannes m zmölnig

    • labels: segfault jack --> puredata, jack, crash, segfault
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     ~~~
     gdb pd
     GNU gdb (GDB) 7.10
    
    • status: open --> pending-works-for-me
     
  • Anonymous

    Anonymous - 2016-05-23

    The suggested fix for Arch Linux introduces other weird behavior with pd. It makes it "unclosable" with a "messaging watchdog" notification upon trying to close pd, which then never happens.
    The JACK connection works fine though...

     
  • IOhannes m zmölnig

    so what is the difference that the suggested fix introduces?

     
  • Anonymous

    Anonymous - 2016-05-25

    The suggested fix is to ignore the global makeflags and buildflags and use pd's provided ones. This means: With the standard global Arch Linux ones the support for JACK breaks. With the pd provided make-/buildflags JACK support works, but the "won't close" bug is introduced (more on that below).

    Arch Linux's current flags for makepkg (the build system) are:
    CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong"
    CPPFLAGS="-D_FORTIFY_SOURCE=2"

    Currently pd is build as follows:
    https://paste.sleepmap.de/view/1c1d393b

    The fix (introducing the "won't close" bug would look as follows:
    https://paste.sleepmap.de/view/491612a2
    (changes are in the options array)

    Side note on the "won't close" bug:
    It seems to be related to JACK, too, or to the .pdsettings file for that matter.
    I deleted the old .pdsettings and restarted pd, reconnected with JACK, saved those settings and suddenly pd has no troubles closing.
    Otherwise verbose messages showed an endless iteration of "watchdog: signaling pd", but nothing happens and pd just hangs.
    Not sure what to make of it yet, but will open a bug report for it, if I encounter it again.

     
    • IOhannes m zmölnig

      i'm still slightly mystified by the build-flags problem: on Debian we use

      CFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" LDFLAGS="-Wl,-z,relro -Wl,--as-needed"
      

      which seems reasonable similar (I suspect that the problem really comes from any hardening flags , and is unrelated to CPU-optimization).
      having said that, i wonder why the Debian builds have omitted the CPPFLAGS="-D_FORTIFY_SOURCE=2"

       
  • IOhannes m zmölnig

    thanks for the detailed explanation.

    the won't close bug should only appear if Pd started jackd (rather than connecting to an already running jackd), and is fixed with Pd-0.7 (and Pd-0.46-7). (The fix is merely to not autostart jackd at all)

     
    • IOhannes m zmölnig

      for the record: the won't close bug has been
      - reported as [#697] and [#909]
      - and has been fixed as ab33f9b2 (resp. 62906ddf in the 0.46 branch)

      ... so there is little value in reporting it again...

       

      Related

      Bugs: #697
      Bugs: #909
      Commit: [62906d]
      Commit: [ab33f9]


      Last edit: IOhannes m zmölnig 2016-05-25
  • Anonymous

    Anonymous - 2016-05-27

    Hmm, I actually never autostart JACK but use a separate systemd user unit for it instead to get around dbus ;-)
    In any case, it seems to work currently, but I have experienced the issue on 46-7.

    I hope, that the PKGBUILD will be fixed downstream with proper buildflags eventually...

     
  • IOhannes m zmölnig

    please check whether https://github.com/pure-data/pure-data/pull/93 fixes the issue for you.

     
    • kubriel

      kubriel - 2017-08-10

      cannot check it, as i dont use arch now.
      i never met this on debian.

      thanks

      k

      On 07/07/17 00:38, "IOhannes m zmölnig" wrote:

      please check whether https://github.com/pure-data/pure-data/pull/93
      fixes the issue for you.


      [bugs:#1228] https://sourceforge.net/p/pure-data/bugs/1228/
      segfault whith jack in libthread_db

      Status: pending-works-for-me
      Group: v0.46
      Labels: puredata jack crash segfault
      Created: Sun Jan 24, 2016 11:27 AM UTC by kubriel
      Last Updated: Fri May 27, 2016 12:45 AM UTC
      Owner: nobody

      gdb pd
      GNU gdb (GDB) 7.10
      .............
      Type "apropos word" to search for commands related to "word"...
      Reading symbols from pd...(no debugging symbols found)...done.
      (gdb) run -jack
      Starting program: /usr/local/bin/pd -jack
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/usr/lib/libthread_db.so.1".

      Program received signal SIGSEGV, Segmentation fault.
      0x0000000000000000 in ?? ()
      (gdb) bt

      0 0x0000000000000000 in ?? ()

      1 0x00000000004b9e5e in jack_open_audio ()

      2 0x000000000046b29e in sys_reopen_audio ()

      3 0x0000000000462591 in sys_main ()

      4 0x00007ffff6c2f610 in __libc_start_main () from /usr/lib/libc.so.6

      5 0x0000000000411bc9 in _start ()

      (gdb) watchdog: signaling pd...
      kill
      Kill the program being debugged? (y or n) y
      watchdog: signaling pd...

      i cannot reproduce it anywhere else, but i dont know where can be the
      problem in this not very fresh arch linux installation(it worked before).
      pd from git, but its same with pd from repo.
      kernel 4.2.5-1-ARCH

      just to let you know..


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/pure-data/bugs/1228/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      http://kubriel.servus.at

       

      Related

      Bugs: #1228

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.