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

Very slow start #1186

Open
CyberShadow opened this issue Dec 24, 2023 · 2 comments
Open

Very slow start #1186

CyberShadow opened this issue Dec 24, 2023 · 2 comments

Comments

@CyberShadow
Copy link

Hi,

I'm trying to use blivet-gui. I think I managed to create a mostly working Nix package, but when I try to run it, the "Scanning storage configuration..." pop-up stays up for about 5 minutes every time.

I am not sure but I think it's because I have many btrfs snapshots.

Looking at the process list, the blivet-gui-daemon process is using 100% CPU, so it looks like it's due to some inefficiency in the Python code.

A GDB stack trace confirms it:

Thread 1 (Thread 0x7f3ce84d9740 (LWP 1390785) ".blivet-gui-dae"):
#0  0x00007f3ce7f5ea68 in gc_collect_main () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#1  0x00007f3ce7f5ff61 in _PyObject_GC_Link () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#2  0x00007f3ce7f6002f in _PyObject_GC_New () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#3  0x00007f3ce7fd4f5e in PyCMethod_New.constprop.0 () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#4  0x00007f3ce7ef7f04 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#5  0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#6  0x00007f3ce80066c9 in PyObject_CallOneArg () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#7  0x00007f3ce7faf635 in wrap_descr_get () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#8  0x00007f3ce804fb2e in PyObject_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#9  0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#10 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#11 0x00007f3ce80066c9 in PyObject_CallOneArg () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#12 0x00007f3ce80772bf in _PyObject_GenericGetAttrWithDict () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#13 0x00007f3ce8078246 in PyObject_GetAttr () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#14 0x00007f3ce7ef59cd in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#15 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#16 0x00007f3ce80066c9 in PyObject_CallOneArg () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#17 0x00007f3ce800846a in list_sort_impl () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#18 0x00007f3ce7f67882 in cfunction_vectorcall_FASTCALL_KEYWORDS () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#19 0x00007f3ce807eff7 in builtin_sorted () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#20 0x00007f3ce7ef93d6 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#21 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#22 0x00007f3ce80066c9 in PyObject_CallOneArg () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#23 0x00007f3ce7faf635 in wrap_descr_get () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#24 0x00007f3ce804fb2e in PyObject_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#25 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#26 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#27 0x00007f3ce80066c9 in PyObject_CallOneArg () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#28 0x00007f3ce80772bf in _PyObject_GenericGetAttrWithDict () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#29 0x00007f3ce8078246 in PyObject_GetAttr () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#30 0x00007f3ce7ef59cd in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#31 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#32 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#33 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#34 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#35 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#36 0x00007f3ce801e6f5 in property_descr_set () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#37 0x00007f3ce7f90472 in wrap_descr_set () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#38 0x00007f3ce804fb2e in PyObject_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#39 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#40 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#41 0x00007f3ce801e6f5 in property_descr_set () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#42 0x00007f3ce80ed079 in _PyObject_GenericSetAttrWithDict () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#43 0x00007f3ce7f7dac5 in PyObject_SetAttr () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#44 0x00007f3ce7ef4f0e in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#45 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#46 0x00007f3ce8038944 in _PyVectorcall_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#47 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#48 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#49 0x00007f3ce8038944 in _PyVectorcall_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#50 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#51 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#52 0x00007f3ce8052cc8 in method_vectorcall () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#53 0x00007f3ce8038944 in _PyVectorcall_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#54 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#55 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#56 0x00007f3ce8038944 in _PyVectorcall_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#57 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#58 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#59 0x00007f3ce8052cc8 in method_vectorcall () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#60 0x00007f3ce8038944 in _PyVectorcall_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#61 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#62 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#63 0x00007f3ce8038944 in _PyVectorcall_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#64 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#65 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#66 0x00007f3ce8052cc8 in method_vectorcall () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#67 0x00007f3ce8038944 in _PyVectorcall_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#68 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#69 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#70 0x00007f3ce8038944 in _PyVectorcall_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#71 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#72 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#73 0x00007f3ce804ed75 in _PyObject_FastCallDictTstate () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#74 0x00007f3ce804f53d in slot_tp_init () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#75 0x00007f3ce7fafc47 in type_call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#76 0x00007f3ce800585d in _PyObject_MakeTpCall () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#77 0x00007f3ce7ef8802 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#78 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#79 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#80 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#81 0x00007f3ce8038944 in _PyVectorcall_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#82 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#83 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#84 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#85 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#86 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#87 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#88 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#89 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#90 0x00007f3ce8038944 in _PyVectorcall_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#91 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#92 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#93 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#94 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#95 0x00007f3ce804ecc6 in _PyObject_FastCallDictTstate () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#96 0x00007f3ce804f53d in slot_tp_init () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#97 0x00007f3ce7fafc47 in type_call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#98 0x00007f3ce804fb2e in PyObject_Call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#99 0x00007f3ce7efad02 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#100 0x00007f3ce812b3aa in _PyEval_Vector () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#101 0x00007f3ce804ecc6 in _PyObject_FastCallDictTstate () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#102 0x00007f3ce804f53d in slot_tp_init () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#103 0x00007f3ce7fafc47 in type_call () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#104 0x00007f3ce800585d in _PyObject_MakeTpCall () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#105 0x00007f3ce7ef8802 in _PyEval_EvalFrameDefault () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#106 0x00007f3ce812bacc in _PyEval_Vector.constprop.0 () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#107 0x00007f3ce812bc6a in PyEval_EvalCode () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#108 0x00007f3ce8155e70 in run_mod () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#109 0x00007f3ce81753b6 in _PyRun_SimpleFileObject () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#110 0x00007f3ce8175c41 in _PyRun_AnyFileObject () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#111 0x00007f3ce8178886 in Py_RunMain () from /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/libpython3.11.so.1.0
storaged-project/blivet-gui#112 0x00007f3ce7b5ffce in __libc_start_call_main () from /nix/store/9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27/lib/libc.so.6
storaged-project/blivet-gui#113 0x00007f3ce7b60089 in __libc_start_main_impl () from /nix/store/9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27/lib/libc.so.6
storaged-project/blivet-gui#114 0x0000000000401075 in _start ()
Detaching from program: /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/bin/python3.11, process 1390785
[Inferior 1 (process 1390785) detached]

If I disable SIGINT handling in the daemon, I can get a Python stack trace:

Traceback (most recent call last):
  File "/nix/store/8lmym9yzgnikcs67jk9k61ghx1bdxsgg-blivet-gui-2.4.2/bin/.blivet-gui-wrapped", line 116, in <module>
    main()
  File "/nix/store/8lmym9yzgnikcs67jk9k61ghx1bdxsgg-blivet-gui-2.4.2/bin/.blivet-gui-wrapped", line 110, in main
    BlivetGUI(client, exclusive_disks=options.disks)
  File "/nix/store/8lmym9yzgnikcs67jk9k61ghx1bdxsgg-blivet-gui-2.4.2/lib/python3.11/site-packages/blivetgui/blivetgui.py", line 113, in __init__
    self.blivet_init()
  File "/nix/store/8lmym9yzgnikcs67jk9k61ghx1bdxsgg-blivet-gui-2.4.2/lib/python3.11/site-packages/blivetgui/blivetgui.py", line 811, in blivet_init
    self._reraise_exception(ret.exception, ret.traceback, message,
  File "/nix/store/8lmym9yzgnikcs67jk9k61ghx1bdxsgg-blivet-gui-2.4.2/lib/python3.11/site-packages/blivetgui/blivetgui.py", line 242, in _reraise_exception
    raise type(exception)(message + "\n" + str(exception) + "\n" + traceback)
ValueError: Failed to init blivet:
Device 'eagan/@arch-20171224032701' not in tree
Traceback (most recent call last):
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/populator.py", line 450, in populate
    self._populate()
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/populator.py", line 494, in _populate
    self.handle_device(dev)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/populator.py", line 313, in handle_device
    self.handle_format(info, device)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/populator.py", line 341, in handle_format
    helper_class(self, info, device).run()
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/helpers/lvm.py", line 435, in run
    self._update_lvs()
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/helpers/lvm.py", line 341, in _update_lvs
    new_lv = add_lv(lv)
             ^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/helpers/lvm.py", line 304, in add_lv
    self._devicetree.handle_device(lv_info, update_orig_fmt=True)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/populator.py", line 313, in handle_device
    self.handle_format(info, device)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/populator.py", line 341, in handle_format
    helper_class(self, info, device).run()
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/helpers/btrfs.py", line 99, in run
    subvol = device_class(vol_path,
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devices/btrfs.py", line 698, in __init__
    super(BTRFSSnapShotDevice, self).__init__(*args, **kwargs)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devices/btrfs.py", line 538, in __init__
    super(BTRFSSubVolumeDevice, self).__init__(*args, **kwargs)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devices/btrfs.py", line 75, in __init__
    super(BTRFSDevice, self).__init__(*args, **kwargs)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devices/storage.py", line 158, in __init__
    self.update_sysfs_path()
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devices/btrfs.py", line 79, in update_sysfs_path
    log_method_call(self, self.name, status=self.status)
                                            ^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devices/btrfs.py", line 109, in status
    return self.exists and all(d.status for d in self.parents)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devices/btrfs.py", line 109, in <genexpr>
    return self.exists and all(d.status for d in self.parents)
                               ^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devices/btrfs.py", line 109, in status
    return self.exists and all(d.status for d in self.parents)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devices/btrfs.py", line 109, in <genexpr>
    return self.exists and all(d.status for d in self.parents)
                               ^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devices/dm.py", line 112, in status
    return blockdev.dm.map_exists(self.map_name, True, True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/48a234n4csc9017rmhyl2nj8axcw92hg-libblockdev-3.0.4/lib/python3.11/site-packages/gi/overrides/BlockDev.py", line 1226, in wrapped
    ret = orig_obj(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/8lmym9yzgnikcs67jk9k61ghx1bdxsgg-blivet-gui-2.4.2/lib/python3.11/site-packages/blivetgui/communication/server.py", line 270, in _blivet_utils_init
    self.blivet_utils = BlivetUtils(*args)
                        ^^^^^^^^^^^^^^^^^^
  File "/nix/store/8lmym9yzgnikcs67jk9k61ghx1bdxsgg-blivet-gui-2.4.2/lib/python3.11/site-packages/blivetgui/blivet_utils.py", line 167, in __init__
    self.blivet_reset()
  File "/nix/store/8lmym9yzgnikcs67jk9k61ghx1bdxsgg-blivet-gui-2.4.2/lib/python3.11/site-packages/blivetgui/blivet_utils.py", line 1539, in blivet_reset
    self.storage.reset()
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/blivet.py", line 140, in reset
    self.devicetree.populate(cleanup_only=cleanup_only)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/populator/populator.py", line 453, in populate
    self._hide_ignored_disks()
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devicetree.py", line 1006, in _hide_ignored_disks
    self.hide(disk)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devicetree.py", line 884, in hide
    self.hide(d)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devicetree.py", line 884, in hide
    self.hide(d)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devicetree.py", line 884, in hide
    self.hide(d)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devicetree.py", line 884, in hide
    self.hide(d)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devicetree.py", line 884, in hide
    self.hide(d)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devicetree.py", line 891, in hide
    self._remove_device(device, force=True, modparent=False)
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/nix/store/kpgbj3nv0clrmranypjajh8q9vaf165z-python3.11-blivet-3.8.2/lib/python3.11/site-packages/blivet/devicetree.py", line 216, in _remove_device
    raise ValueError("Device '%s' not in tree" % dev.name)
ValueError: Device 'eagan/@arch-20171224032701' not in tree

That looks like there might be some unintended recursion causing exponential complexity.

I tried to limit the devices that it looks at by specifying one device on the command line, but that doesn't seem to stop it from scanning everything and taking a very long time to start.

@vojtechtrefny vojtechtrefny transferred this issue from storaged-project/blivet-gui Jan 8, 2024
@vojtechtrefny
Copy link
Member

I transferred the issue to blivet, based on the tracebacks, this isn't related to the GUI part, the backend is slow. Can you please share logs from blivet (you should find them in /var/log/blivet-gui. There shouldn't be anything sensitive in the log, but if you don't want to share it publicly, you can send the to me to vtrefny AT redhat.com. Thanks. And big thanks for packaging blivet-gui for NixOS!

@CyberShadow
Copy link
Author

OK, here are the logs: blivet-gui-logs.tar.gz
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants