Hi Landry, dlg, and ports,

Since last "sysupgrade -s", I experience occasional Firefox crashes,
most likely related to recent pledge_socket changes[0]. I can reproduce
those crashes on any Stack Overflow thread, which I realized while
trying to understand what was going on. Of course, some configuration or
plugins of mine might interfere.

> $ uname -a
> OpenBSD gjain 8.0 GENERIC.MP#14 amd64

> $ ktrace firefox
> firefox[81551]: pledge "inet", syscall 105
> Exiting due to channel error.
> Exiting due to channel error.
> Exiting due to channel error.
> Exiting due to channel error.
> Exiting due to channel error.
> Abort trap (core dumped) 

> $ kdump | tail
>  81551 firefox  RET   socket 79/0x4f
>  81551 firefox  CALL  setsockopt(79,6<tcp>,1,0x166509009a4,4)
>  81551 firefox  PLDG  setsockopt, "inet", errno 1 Operation not permitted
>  81551 firefox  STRU  struct pollfd [3] { fd=6, events=0x1<POLLIN>, 
> revents=0<> } { fd=10, events=0x1<POLLIN>, revents=0<> } { fd=27, 
> events=0x1<POLLIN>, revents=0<> }
>  81551 firefox  STRU  struct pollfd [2] { fd=8, events=0x1<POLLIN>, 
> revents=0<> } { fd=60, events=0x1<POLLIN>, revents=0<> }
>  81551 firefox  STRU  struct pollfd [7] { fd=22, events=0x3<POLLIN|POLLPRI>, 
> revents=0<> } { fd=78, events=0x3<POLLIN|POLLPRI>, revents=0<> } { fd=105, 
> events=0x3<POLLIN|POLLPRI>, revents=0<> } { fd=108, 
> events=0x3<POLLIN|POLLPRI>, revents=0<> } { fd=143, 
> events=0x3<POLLIN|POLLPRI>, revents=0<> } { fd=85, 
> events=0x3<POLLIN|POLLPRI>, revents=0<> } { fd=86, 
> events=0x3<POLLIN|POLLPRI>, revents=0<> }
>  81551 firefox  STRU  struct pollfd [2] { fd=11, events=0x1<POLLIN>, 
> revents=0<> } { fd=12, events=0x1<POLLIN>, revents=0<> }
>  81551 firefox  STRU  struct pollfd { fd=24, events=0x1<POLLIN>, revents=0<> }
>  81551 firefox  PSIG  SIGABRT SIG_DFL
>  81551 firefox  NAMI  "firefox.core"

> $ egdb $(which firefox) firefox.core
> [...]
> (gdb) bt
> #0  setsockopt () at /tmp/-:2
> #1  0x88af55aadaf6a290 in ?? ()
> #2  0x000005456bce7455 in g_socket_set_option () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #3  0x000005456bced356 in g_socket_constructed () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #4  0x0000054603092933 in g_object_new_internal () from 
> /usr/local/lib/libgobject-2.0.so.4200.23
> #5  0x00000546030925b8 in g_object_new_valist () from 
> /usr/local/lib/libgobject-2.0.so.4200.23
> #6  0x000005456bcbb311 in g_initable_new_valist () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #7  0x000005456bcbb18d in g_initable_new () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #8  0x000005456bce70ce in g_socket_new () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #9  0x000005456bcf035d in create_socket () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #10 0x000005456bcefc75 in g_socket_client_connect () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #11 0x000005456bd5841e in g_dbus_address_try_connect_one () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #12 0x000005456bd57ffd in g_dbus_address_get_stream_sync () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #13 0x000005456bd6962d in initable_init () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #14 0x000005456bc799c5 in async_init_thread () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #15 0x000005456bcfe97e in g_task_thread_pool_thread () from 
> /usr/local/lib/libgio-2.0.so.4200.23
> #16 0x00000545a5f83714 in g_thread_pool_thread_proxy () from 
> /usr/local/lib/libglib-2.0.so.4201.16
> #17 0x00000545a5f813e4 in g_thread_proxy () from 
> /usr/local/lib/libglib-2.0.so.4201.16
> #18 0x0000054567881eb2 in _rthread_start (v=0x1) at 
> /usr/src/lib/librthread/rthread.c:99
> #19 0x000005459b382a9a in __tfork_thread () at 
> /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:87

Thanks for all your work.

Best,
Alvar

[0]: 
https://github.com/openbsd/src/commit/f2b65ce05bc267cd9c039c0e3cfa2cc70718938d

Reply via email to