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

Mount failing with segfault after updating Ubuntu 22.04 #858

Closed
cbarreholm opened this issue Apr 15, 2024 · 13 comments
Closed

Mount failing with segfault after updating Ubuntu 22.04 #858

cbarreholm opened this issue Apr 15, 2024 · 13 comments

Comments

@cbarreholm
Copy link

cbarreholm commented Apr 15, 2024

After updating Ubuntu 22.04 my existing use of google-drive-ocamlfuse stopped working.

Running
google-drive-ocamlfuse -debug -label christer@example.com /home/christer/GoogleDrive/christer@example.com/
results in exit code 0 (zero) and no output what so ever. No mount. It results in the following entries in journalctl:

apr 15 19:49:47 MyHost kernel: google-drive-oc[137048]: segfault at 2f ip 00007502abf9d7fd sp 00007ffe9d1e0e48 error 4 in libc.so.6[7502abe28000+195000] likely on CPU 0 (core 0, socket 0)
apr 15 19:49:47 MyHost kernel: Code: f8 77 c3 66 2e 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 89 f8 48 89 fa c5 f9 ef c0 25 ff 0f 00 00 3d e0 0f 00 00 0f 87 33 01 00 00 <c5> fd 74 0f c5 fd d7 c1 85 c0 74 57 f3 0f bc c0 c5 f8 77 c3 66 66

Version

apt-cache showpkg google-drive-ocamlfuse
Package: google-drive-ocamlfuse
Versions: 
0.7.32-0ubuntu1~bpo22.04.1 (/var/lib/apt/lists/ppa.launchpadcontent.net_alessandro-strada_ppa_ubuntu_dists_jammy_main_binary-amd64_Packages) (/var/lib/dpkg/status)
 Description Language: 
                 File: /var/lib/apt/lists/ppa.launchpadcontent.net_alessandro-strada_ppa_ubuntu_dists_jammy_main_binary-amd64_Packages
                  MD5: 65ec543c92cc50e7d73349b8f27366d8
 Description Language: en
                 File: /var/lib/apt/lists/ppa.launchpadcontent.net_alessandro-strada_ppa_ubuntu_dists_jammy_main_i18n_Translation-en
                  MD5: 65ec543c92cc50e7d73349b8f27366d8


Reverse Depends: 
Dependencies: 
0.7.32-0ubuntu1~bpo22.04.1 - libc6 (2 2.35) libcurl3-gnutls (2 7.66.0) libfuse2 (2 2.8) libgmp10 (2 2:6.2.1+dfsg) libsqlite3-0 (2 3.25.0) zlib1g (2 1:1.1.4) fuse (0 (null)) 
Provides: 
0.7.32-0ubuntu1~bpo22.04.1 - 
Reverse Provides: 

In /var/log/apt/history.log I found

Start-Date: 2024-04-15  09:30:49
Commandline: aptdaemon role='role-commit-packages' sender=':1.80410'
Install: linux-tuxedo-6.5-headers-6.5.0-10031:amd64 (6.5.0-10031.35, automatic), linux-image-6.5.0-10031-tuxedo:amd64 (6.5.0-10031.35, automatic), linux-modules-6.5.0-10031-tuxedo:amd64 (6.5.0-10031.35, automatic), linux-modules-extra-6.5.0-10031-tuxedo:amd64 (6.5.0-10031.35, automatic), linux-headers-6.5.0-10031-tuxedo:amd64 (6.5.0-10031.35, automatic)
Upgrade: tuxedo-drivers:amd64 (4.3.2, 4.4.0), google-drive-ocamlfuse:amd64 (0.7.30-1ubuntu1~bpo22.04.1, 0.7.32-0ubuntu1~bpo22.04.1), linux-tuxedo-22.04:amd64 (6.5.0.10027.96, 6.5.0.10031.101), linux-headers-tuxedo-22.04:amd64 (6.5.0.10027.96, 6.5.0.10031.101), chromium:amd64 (1:123.0.6312.105-1tux1, 1:123.0.6312.122-1tux1), linux-image-tuxedo-22.04:amd64 (6.5.0.10027.96, 6.5.0.10031.101), tuxedo-tomte:amd64 (2.28.0, 2.29.0), linux-tuxedo-22.04-edge:amd64 (6.5.0.10027.96, 6.5.0.10031.101)
End-Date: 2024-04-15  09:32:31

Would be interesting to see if I could downgrade to 0.7.30-1ubuntu1~bpo22.04.1

@astrada
Copy link
Owner

astrada commented Apr 15, 2024

Sure, you can find old versions here: https://ppa.launchpadcontent.net/alessandro-strada/ppa/ubuntu/pool/main/g/google-drive-ocamlfuse/

But if you know how to use gdb, and you could send me the stack trace of the segmentation fault, I think I can fix the issue (I thought it was the @ character, but I can't reproduce the error on my machine). Thanks!

@Roland-Brown-Trimble
Copy link

Roland-Brown-Trimble commented Apr 15, 2024

I am having a similar result with no output from the command, no mount, and exit code 0. I too have a script to automatically parse the .gdfuse folder with formatted tags, create directories and mount them. My drives and shared folders on one account are mounting fine but another account is failing silently. I am getting nothing in the journalctl output.

I just tried another account and it also failed silently.

I downgraded to google-drive-ocamlfuse_0.7.30-1ubuntu1~bpo20.04.1_amd64.deb and now it works perfectly.

@IlgazC
Copy link

IlgazC commented Apr 16, 2024

Sure, you can find old versions here: https://ppa.launchpadcontent.net/alessandro-strada/ppa/ubuntu/pool/main/g/google-drive-ocamlfuse/

But if you know how to use gdb, and you could send me the stack trace of the segmentation fault, I think I can fix the issue (I thought it was the @ character, but I can't reproduce the error on my machine). Thanks!

Is there a easy way to invoke gdb and output a usable file over command line? I am actually having the exact issue @Roland-Brown-Trimble mentions, however it must have a record somewhere.

@cbarreholm
Copy link
Author

I can invoke gdb if I get some more guidance. I haven't used it for decades.

@knoffelcut
Copy link

I also seem be experience the same or similar issues. In my journalctl output the following is present:

Apr 16 07:56:08 X systemd[1]: google-drive-ocamlfuse-X.service: Main process exited, code=dumped, status=11/SEGV
Apr 16 07:56:08 X systemd[1]: google-drive-ocamlfuse-X.service: Failed with result 'core-dump'.

It only failed to mount since I updated on Sunday.

$ sudo apt show google-drive-ocamlfuse
Package: google-drive-ocamlfuse
Version: 0.7.32-0ubuntu1~bpo22.04.1
Priority: optional
Section: ocaml
Maintainer: Alessandro Strada <alessandro.strada@gmail.com>
Installed-Size: 8,322 kB
Depends: libc6 (>= 2.35), libcurl3-gnutls (>= 7.66.0), libfuse2 (>= 2.8), libgmp10 (>= 2:6.2.1+dfsg), libsqlite3-0 (>= 3.25.0), zlib1g (>= 1:1.1.4)

I have two mountpoints configured.
One is for my standard Google Drive storage. I seemed to get this one running successfully by adding the -debug flag (tried twice and worked twice, restart in between). What really confused me is that the command still exited immediately (even though -debug implies -f), but the mountpoint is perfectly accessible.

The other one is a shared team directory. I successfully mounted this one using the -debug -s -f flags and the command runs in the foreground as expected.

@astrada
Copy link
Owner

astrada commented Apr 16, 2024

I think the problem is caused by this issue: astrada/ocamlfuse#26. I thought I included the fix in the Ubuntu package but I probably missed it. I will release a new package when I get home.

@IlgazC
Copy link

IlgazC commented Apr 17, 2024

I could mount via '-d' (debug) flag here too, however I see no core-dumps in the journal at all (tried with grep). Additionally, it doesn't "detach" here, e.g. I don't see a command prompt after '-d' argument. It just works.
As there aren't hundreds of bug reports as a result of new release, could this be a CPU/package versions specific thing?

@astrada
Copy link
Owner

astrada commented Apr 17, 2024

As there aren't hundreds of bug reports as a result of new release, could this be a CPU/package versions specific thing?

I don't know, but I have Ubuntu 22.04 on Intel as the majority of users experiencing this issue, it seems. And I am unable to reproduce it. It probably is a stupid bug in the C code I had to add in order to compile with OCaml 5+. As I am not a C programmer, it's super easy for me to introduce a bug like that. Instead of -d you can use as a workaround the -f option that keeps also the process in foreground and doesn't dump tons of text on the console while running.

@astrada
Copy link
Owner

astrada commented Apr 17, 2024

I can invoke gdb if I get some more guidance. I haven't used it for decades.

@cbarreholm, to enable saving core dumps on disk, run in a bash shell:

ulimit -c unlimited

Then, run google-drive-ocamlfuse, and you should see a core dump in /var/lib/apport/coredump/ (on Ubuntu). Then you can run gdb:

gdb $(which google-drive-ocamlfuse) [path of the core dump file]

From the gdb console, run:

bt

to get the stack trace. Thanks!

@knoffelcut
Copy link

knoffelcut commented Apr 18, 2024

I think the problem is caused by this issue: astrada/ocamlfuse#26. I thought I included the fix in the Ubuntu package but I probably missed it. I will release a new package when I get home.

I updated this morning (from apt) and it seems to have fixed the issue for me. Thank you very much

@cbarreholm
Copy link
Author

Updated to 0.7.32-0ubuntu3
Problem solved. ✔️

(Side note. I followed the instructions to create core dump before upgrading, but nothing ended up in /var/lib/apport/coredump/)

@astrada
Copy link
Owner

astrada commented Apr 18, 2024

@cbarreholm thanks for your feedback!

@IlgazC
Copy link

IlgazC commented May 16, 2024

As there aren't hundreds of bug reports as a result of new release, could this be a CPU/package versions specific thing?

I don't know, but I have Ubuntu 22.04 on Intel as the majority of users experiencing this issue, it seems. And I am unable to reproduce it. It probably is a stupid bug in the C code I had to add in order to compile with OCaml 5+. As I am not a C programmer, it's super easy for me to introduce a bug like that. Instead of -d you can use as a workaround the -f option that keeps also the process in foreground and doesn't dump tons of text on the console while running.

Interestingly, I created the same issue via 'opam install google-drive-ocamlfuse' and running it. It works perfectly with -d or -f , disappears without a trace otherwise. This is kde neon (22.04 Ubuntu based)

I used the package on this page https://ocaml.org/p/google-drive-ocamlfuse

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

5 participants