meganz / MEGAcmd

Command Line Interactive and Scriptable Application to access MEGA
Other
1.94k stars 407 forks source link

mega-cmd-server segmentation fault #793

Open Else00 opened 1 year ago

Else00 commented 1 year ago

I'm trying to configure megacmd on my Raspberry pi 4 running Raspbian 11 64 bit. Yesterday I installed mega-cmd and configured it and it worked fine but today i continue to get segmentation fault from the server. I tried multiple times to: reboot, logout and log in, reinstall megacmd, watch other users issue on this github page but nothing worked. I really need this to work so I would really appreciate if someone could help me.

This is the script that I wrote for reinstall megacmd

#!/bin/bash
sources=/etc/apt/sources.list.d/mega.nz.list
if ! [ -f "${sources}" ]; then
    printf "# Mega.nz repo for 32bit (compatable with 64-bit) Raspberry Pi\ndeb [arch=armhf] https://mega.nz/linux/MEGAsync/Raspbian_10.0/ ./\n" > "${sources}"
    wget -O - https://mega.nz/linux/MEGAsync/Raspbian_10.0/Release.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mega-release.gpg --yes
    apt-get update
fi

echo "REMOVING SETTINGS"
rm -rf ~/.megaCmd
echo "REMOVING MEGACMD"
sudo apt-get remove --purge megacmd -y

echo "INSTALLING MEGACMD"
apt-get install megacmd -y

echo "MEGACMD LOGIN"
mega-login <user> <pass>

Every time i launch mega-cmd I get:

Screenshot 2023-03-22 at 11 45 12

And if i run mega-cmd-server I get:

Screenshot 2023-03-22 at 11 45 48
polmr commented 1 year ago

Hi there.

Would you mind assisting us in debugging the reason for that?

1 - install debug symbols

sudo apt update && sudo apt install megacmd-dbg

2 - run mega-cmd-server in a debugger (you might need to install gdb)

gdb mega-cmd-server

It should say something like:

Reading symbols from mega-cmd-server...Reading symbols from /usr/lib/debug/.build-id/10/3dc7527ee44c6531970f4ab228264c223bc4c6.debug...done.
done.
(gdb) 

3 - Then run the program (type 'r' + Enter) Let it run until it crashes. (if it doesn't, open another console and use the interactive shell mega-cmd until it crashes)

4 - once so, then type in the gdb console:

set pagination off
thread apply all bt

5 - then please, scroll back and send us the entire output of that command.

Also, increasing log level with log DEBUG from a MEGAcmd shell (mega-cmd), may give us some hints. The logs will be locate at /home/pi/.megaCmd/megacmdserver.log as stated above

Btw, you are using an old repository. We have migrated to:

https://mega.nz/linux/repo/Raspbian_10.0/