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

[Bug]: Bad page map in process conky causes crash #1824

Open
yongjizhao opened this issue Apr 15, 2024 · 4 comments · Fixed by #1876
Open

[Bug]: Bad page map in process conky causes crash #1824

yongjizhao opened this issue Apr 15, 2024 · 4 comments · Fixed by #1876
Labels
bug related to incorrect existing implementation of some functionality need details waiting for more details from reporter or community

Comments

@yongjizhao
Copy link

yongjizhao commented Apr 15, 2024

What happened?

No response

Version

conky 1.12.2

Which OS/distro are you seeing the problem on?

Ubuntu

Stack trace

audit[1927]: ANOM_ABEND auid=1001 uid=1001 gid=1001 ses=1 subj=unconfined pid=1927 comm="conky" exe="/usr/bin/conky" sig=11 res=1
audit[1927]: ANOM_ABEND auid=1001 uid=1001 gid=1001 ses=1 subj=unconfined pid=1927 comm="conky" exe="/usr/bin/conky" sig=11 res=1
kernel: show_signal_msg: 17 callbacks suppressed
kernel: conky[1948]: segfault at 7f3054277ae0 ip 00007f3054277ae0 sp 00007f304e057908 error 15 in libstdc++.so.6.0.30[7f30541c4000+111000]
kernel: Code: 48 89 c1 48 89 f2 48 8d 3d 45 04 06 00 31 c0 48 8d 35 24 04 06 00 e8 3f 0f f5 ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <
kernel: conky[1963]: segfault at 7f3054277ae0 ip 00007f3054277ae0 sp 00007f3047049908 error 15
kernel: Code: 48 89 c1 48 89 f2 48 8d 3d 45 04 06 00 31 c0 48 8d 35 24 04 06 00 e8 3f 0f f5 ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <
kernel: __swap_info_get: Bad swap file entry 28037fffffffffff
kernel: BUG: Bad page map in process conky  pte:5100000000000000 pmd:10b6b3067
kernel: addr:00007f305420b000 vm_flags:08000075 anon_vma:0000000000000000 mapping:ffff9e8183b1abe8 index:e1
kernel: file:libstdc++.so.6.0.30 fault:filemap_fault mmap:ext4_file_mmap readpage:ext4_readpage
kernel: CPU: 1 PID: 1967 Comm: conky Not tainted 5.15.0-91-generic #101-Ubuntu

Relevant log output

No response

@yongjizhao yongjizhao added bug related to incorrect existing implementation of some functionality triage issue that hasn't been verified, categorized or acknowledged yet labels Apr 15, 2024
@brndnmtthws
Copy link
Owner

It would be very helpful if you could obtain a stack trace.

Instructions for getting debug symbols on Ubuntu are available here: https://wiki.ubuntu.com/Debug%20Symbol%20Packages

And there are instructions here on how to obtain a stack trace with gdb (should work with lldb too, if you prefer LLVM): https://askubuntu.com/a/1349048

@brndnmtthws brndnmtthws removed the triage issue that hasn't been verified, categorized or acknowledged yet label Apr 15, 2024
@Caellian Caellian added the need details waiting for more details from reporter or community label Apr 17, 2024
@Caellian
Copy link
Collaborator

Given that the kernel spits out errors with regards to mmap, and that we use mmap from a single place in conky here. I'm assuming that call is failing.

According to wayland docs:

From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail.

We don't need a MAP_SHARED mmap.

@Caellian Caellian added display: wayland related to Wayland backend and removed need details waiting for more details from reporter or community labels Apr 30, 2024
@Caellian Caellian changed the title [Bug]: conky[1948]: segfault at 7f3054277ae0 ip 00007f3054277ae0 sp 00007f304e057908 error 15 in libstdc++.so.6.0.30[7f30541c4000+111000] [Bug]: conky uses MAP_SHARED mmap for shm Apr 30, 2024
@Caellian Caellian added this to the Wayland Support milestone Apr 30, 2024
@Caellian
Copy link
Collaborator

Assuming the PR fixes the issue. Please provide more details to have this issue reopened.

@Caellian
Copy link
Collaborator

Caellian commented Dec 7, 2024

From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail.

This comes from wl_keyboard::keymap, not sure how I got it mixed into wl_shm::create_pool. Maybe opened a wrong tab?! 🤷‍♂️

This issue is reopened by #2104.

@yongjizhao can you specify your WM and whether you're using wayland? Does this issue still occur on latest main branch?

@Caellian Caellian reopened this Dec 7, 2024
@Caellian Caellian changed the title [Bug]: conky uses MAP_SHARED mmap for shm [Bug]: Bad page map in process conky causes crash Dec 7, 2024
@Caellian Caellian added need details waiting for more details from reporter or community and removed display: wayland related to Wayland backend labels Dec 7, 2024
@Caellian Caellian removed this from the Wayland Support milestone Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug related to incorrect existing implementation of some functionality need details waiting for more details from reporter or community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants