Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault on Alpine Linux when loading secrets #2065

Open
tml opened this issue Jan 25, 2024 · 5 comments
Open

segfault on Alpine Linux when loading secrets #2065

tml opened this issue Jan 25, 2024 · 5 comments
Assignees
Labels
bug Unexpected problem or unintended behavior waiting info Waiting for info from author of issue

Comments

@tml
Copy link

tml commented Jan 25, 2024

Describe the bug

During weechat startup, when prompted for the passphrase to decrypt secured data, I get a segfault as soon as I enter the correct passphrase.

Steps to reproduce

  1. Have encrypted data
  2. Start weechat
  3. Enter passphrase at prompt and hit enter
  4. Get segfault

Current behavior

Please enter your passphrase to decrypt the data secured by WeeChat:
(enter just one space to skip the passphrase, but this will DISABLE all secured data!)
(press ctrl-c to exit WeeChat now)

=> ********
Program received signal SIGSEGV, Segmentation fault.

Expected behavior

Weechat should not segfault

Suggested solutions

No response

Additional information

Please enter your passphrase to decrypt the data secured by WeeChat:
(enter just one space to skip the passphrase, but this will DISABLE all secured data!)
(press ctrl-c to exit WeeChat now)

=> ********
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff56ecfef in ?? () from /usr/lib/python3.11/lib-dynload/_hashlib.cpython-311-x86_64-linux-musl.so
#2 0x00007ffff56ecdc0 in ?? () from /usr/lib/python3.11/lib-dynload/_hashlib.cpython-311-x86_64-linux-musl.so
#3 0x00007ffff61406a6 in ?? () from /usr/lib/libpython3.11.so.1.0
#4 0x00007ffff613fb04 in PyObject_Vectorcall () from /usr/lib/libpython3.11.so.1.0
#5 0x00007ffff6133b2e in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.11.so.1.0
#6 0x00007ffff61318fa in ?? () from /usr/lib/libpython3.11.so.1.0
#7 0x00007ffff61b3198 in PyEval_EvalCode () from /usr/lib/libpython3.11.so.1.0
#8 0x00007ffff61cadfe in ?? () from /usr/lib/libpython3.11.so.1.0
#9 0x00007ffff61406a6 in ?? () from /usr/lib/libpython3.11.so.1.0
#10 0x00007ffff61375cf in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.11.so.1.0
#11 0x00007ffff61318fa in ?? () from /usr/lib/libpython3.11.so.1.0
#12 0x00007ffff6147514 in ?? () from /usr/lib/libpython3.11.so.1.0
#13 0x00007ffff6167fa0 in PyObject_CallMethodObjArgs () from /usr/lib/libpython3.11.so.1.0
#14 0x00007ffff6167a5e in PyImport_ImportModuleLevelObject () from /usr/lib/libpython3.11.so.1.0
#15 0x00007ffff6138db8 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.11.so.1.0
#16 0x00007ffff61318fa in ?? () from /usr/lib/libpython3.11.so.1.0
#17 0x00007ffff61b3198 in PyEval_EvalCode () from /usr/lib/libpython3.11.so.1.0
#18 0x00007ffff61d1673 in ?? () from /usr/lib/libpython3.11.so.1.0
#19 0x00007ffff61cdeea in ?? () from /usr/lib/libpython3.11.so.1.0
#20 0x00007ffff61e3153 in ?? () from /usr/lib/libpython3.11.so.1.0
#21 0x00007ffff61e28c7 in _PyRun_SimpleFileObject () from /usr/lib/libpython3.11.so.1.0
#22 0x00007ffff611465c in PyRun_SimpleFileExFlags () from /usr/lib/libpython3.11.so.1.0
#23 0x00007ffff6589a23 in weechat_python_load () from /usr/lib/weechat/plugins/python.so
#24 0x0000555555579ec7 in ?? ()
#25 0x00007ffff65a4211 in plugin_script_auto_load () from /usr/lib/weechat/plugins/python.so
#26 0x00007ffff65a452c in plugin_script_init () from /usr/lib/weechat/plugins/python.so
#27 0x00007ffff658a51f in weechat_plugin_init () from /usr/lib/weechat/plugins/python.so
#28 0x00005555555d21b6 in ?? ()
#29 0x00005555555d3dce in ?? ()
#30 0x00005555555d41de in ?? ()
#31 0x0000555555559ddb in ?? ()
#32 0x0000555555559059 in ?? ()
#33 0x00007ffff7f786d1 in libc_start_main_stage2 (main=0x555555559030, argc=1, argv=0x7fffffffea58) at src/env/__libc_start_main.c:95
#34 0x000055555555908b in ?? ()
#35 0x0000000000000001 in ?? ()
#36 0x00007fffffffece8 in ?? ()
#37 0x0000000000000000 in ?? ()

WeeChat version

4.1.2

What OS are you using?

Alpine Linux 3.19

On which terminal are you running WeeChat?

No response

Which terminal multiplexer are you using?

tmux

@tml tml added the bug Unexpected problem or unintended behavior label Jan 25, 2024
@tml
Copy link
Author

tml commented Jan 25, 2024

Deleting the python plugin from /usr/libs/weechat/plugins allowed weechat to start

@flashcode
Copy link
Member

Hi @tml,

It seems you have some Python scripts installed, can you please give me the list, so I can try on Alpine to reproduce the issue?

Thanks.

@flashcode flashcode self-assigned this Jan 26, 2024
@flashcode flashcode added the waiting info Waiting for info from author of issue label Jan 26, 2024
@tml
Copy link
Author

tml commented Jan 26, 2024

That's the thing, I don't actually have any python scripts installed.

❯ cd ~/.config/weechat
❯ ls -1
alias.conf
buflist.conf
charset.conf
exec.conf
fifo.conf
fset.conf
guile.conf
irc.conf
logger.conf
lua.conf
perl.conf
plugins.conf
python.conf
relay.conf
ruby.conf
script.conf
sec.conf
spell.conf
tcl.conf
trigger.conf
typing.conf
weechat.conf
xfer.conf

❯ cat plugins.conf
   1   │ #
   2   │ # weechat -- plugins.conf
   3   │ #
   4   │ # WARNING: It is NOT recommended to edit this file by hand,
   5   │ # especially if WeeChat is running.
   6   │ #
   7   │ # Use commands like /set or /fset to change settings in WeeChat.
   8   │ #
   9   │ # For more info, see: https://weechat.org/doc/weechat/quickstart/
  10   │ #
  11   │
  12   │ [var]
  13   │
  14   │ [desc]

~/.config/weechat
❯ cat python.conf

   1   │ #
   2   │ # weechat -- python.conf
   3   │ #
   4   │ # WARNING: It is NOT recommended to edit this file by hand,
   5   │ # especially if WeeChat is running.
   6   │ #
   7   │ # Use commands like /set or /fset to change settings in WeeChat.
   8   │ #
   9   │ # For more info, see: https://weechat.org/doc/weechat/quickstart/
  10   │ #
  11   │
  12   │ [look]
  13   │ check_license = off
  14   │ eval_keep_context = on

@tml
Copy link
Author

tml commented Jan 26, 2024

/script list
14:24:25 │
14:24:25 │ Scripts loaded:
14:24:25 │   (none)

@flashcode
Copy link
Member

flashcode commented Jan 29, 2024

According to your backtrace, Python is loading a script, can you check in ~/.local/share/weechat/python/ if you have some Python scripts? (scripts installed are not visible in configuration files)

Or try to run weechat -s, which runs WeeChat without loading any script. Does that help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior waiting info Waiting for info from author of issue
Projects
None yet
Development

No branches or pull requests

2 participants