octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60365] segfault at exit after "test audiodevi


From: Dmitri A. Sergatskov
Subject: [Octave-bug-tracker] [bug #60365] segfault at exit after "test audiodevinfo"
Date: Tue, 8 Nov 2022 17:25:59 -0500 (EST)

Follow-up Comment #4, bug #60365 (project octave):

The problem is still there (as of Fedora 37 and pipewire 0.3.59).
Except it now triggers by a = audiodevinfo ()
(test ./libinterp/dldfcn/audiodevinfo.cc-tst seems to be OK):


octave:1> a = audiodevinfo ()
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
a =

  scalar structure containing the fields:

    input =

      1x9 struct array containing the fields:

        Name
        DriverVersion
        ID

    output =

      1x14 struct array containing the fields:

        Name
        DriverVersion
        ID


octave:2> quit
fatal: caught signal Segmentation fault -- stopping myself...
Segmentation fault (core dumped)



It is also somewhat intermittent -- running under gdb (./run-octave -g)
sometimes does not coredumps. When it does:


 octave:1> a = audiodevinfo ()
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
[New Thread 0x7ffed02ed640 (LWP 2483367)]
[New Thread 0x7ffecfad6640 (LWP 2483370)]
[Thread 0x7ffecfad6640 (LWP 2483370) exited]
[Thread 0x7ffed02ed640 (LWP 2483367) exited]
[New Thread 0x7ffed02ed640 (LWP 2483371)]
[New Thread 0x7ffecfad6640 (LWP 2483374)]
[Thread 0x7ffecfad6640 (LWP 2483374) exited]
[Thread 0x7ffed02ed640 (LWP 2483371) exited]
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
[New Thread 0x7ffed02ed640 (LWP 2483375)]
[New Thread 0x7ffecfad6640 (LWP 2483378)]
[Thread 0x7ffecfad6640 (LWP 2483378) exited]
[Thread 0x7ffed02ed640 (LWP 2483375) exited]
[New Thread 0x7ffed02ed640 (LWP 2483379)]
[New Thread 0x7ffecfad6640 (LWP 2483382)]
[Thread 0x7ffecfad6640 (LWP 2483382) exited]
[Thread 0x7ffed02ed640 (LWP 2483379) exited]
[New Thread 0x7ffed02ed640 (LWP 2483383)]
[Thread 0x7ffed02ed640 (LWP 2483383) exited]
[New Thread 0x7ffed02ed640 (LWP 2483386)]
[New Thread 0x7ffecfad6640 (LWP 2483387)]
a =

  scalar structure containing the fields:

    input =

      1x9 struct array containing the fields:

        Name
        DriverVersion
        ID

    output =

      1x14 struct array containing the fields:

        Name
        DriverVersion
        ID


octave:2> quit

Thread 20 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffecfad6640 (LWP 2483387)]
0x00007ffed0519f40 in ?? ()
Missing separate debuginfos, ...
<...deleted...>
(gdb) thread apply all bt

Thread 20 (Thread 0x7ffecfad6640 (LWP 2483387) "QThread"):
#0  0x00007ffed0519f40 in  ()
#1  0x00007ffed040e48d in loop_iterate (object=0x62d009286428,
timeout=<optimized out>) at ../spa/plugins/support/loop.c:430
#2  0x00007ffed0468157 in do_loop (user_data=0x6040014e1090) at
../src/pipewire/data-loop.c:81
#3  0x00007fffee09f822 in start_thread () at /lib64/libc.so.6
#4  0x00007fffee03f450 in clone3 () at /lib64/libc.so.6

<...deleted...>


loop_iterate:


static int loop_iterate(void *object, int timeout)
{
        struct impl *impl = object;
        struct spa_poll_event ep[MAX_EP], *e;
        int i, nfds;

        impl->polling = true;
        spa_loop_control_hook_before(&impl->hooks_list);

        nfds = spa_system_pollfd_wait(impl->system, impl->poll_fd, ep,
SPA_N_ELEMENTS(ep), timeout);

        spa_loop_control_hook_after(&impl->hooks_list);
        impl->polling = false;

        struct cancellation_handler_data cdata = { ep, nfds };
        pthread_cleanup_push(cancellation_handler, &cdata);

        /* first we set all the rmasks, then call the callbacks. The reason is
that
         * some callback might also want to look at other sources it manages
and
         * can then reset the rmask to suppress the callback */
        for (i = 0; i < nfds; i++) {
                struct spa_source *s = ep[i].data;

                spa_assert(s->loop == &impl->loop);

                s->rmask = ep[i].events;
                /* already active in another iteration of the loop,
                 * remove it from that iteration */
                if (SPA_UNLIKELY(e = s->priv))
                        e->data = NULL;
                s->priv = &ep[i];
        }

        if (SPA_UNLIKELY(!spa_list_is_empty(&impl->destroy_list)))
                process_destroy(impl);

        for (i = 0; i < nfds; i++) {
                struct spa_source *s = ep[i].data;
                if (SPA_LIKELY(s && s->rmask))
                        s->func(s);
        } // <--- this is line 431 in loop.c file

        pthread_cleanup_pop(true);

        return nfds;
}


I wonder if we might not closing audidevice correctly at exit? 

Dmitri.
-- 



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60365>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]