Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

random SEGFAULT #1507

Open
programminghoch10 opened this issue Jul 25, 2024 · 1 comment
Open

random SEGFAULT #1507

programminghoch10 opened this issue Jul 25, 2024 · 1 comment
Labels
bug 🐛 Something isn't working Linux 🐧 Linux related issues
Milestone

Comments

@programminghoch10
Copy link

programminghoch10 commented Jul 25, 2024

I randomly encountered this:

FATAL PROGRAM ERROR DETECTED
============================
Please check at https://htop.dev/issues whether this issue has already been reported.
If no similar issue has been reported before, please create a new issue with the following information:
  - Your htop version: '3.3.0'
  - Your OS and kernel version (uname -a)
  - Your distribution and release (lsb_release -a)
  - Likely steps to reproduce (How did it happen?)
  - Backtrace of the issue (see below)

Error information:
------------------
A signal 11 (Segmentation fault) was received.

Setting information:
--------------------
htop_version=3.3.0;config_reader_min_version=3;fields=0 48 18 54 2 46 47 39 113 111 20 53 49 1;hide_kernel_threads=1;hide_userland_threads=1;hide_running_in_container=0;shadow_other_users=1;show_thread_names=0;show_program_path=0;highlight_base_name=1;highlight_deleted_exe=1;shadow_distribution_path_prefix=0;highlight_megabytes=1;highlight_threads=1;highlight_changes=1;highlight_changes_delay_secs=60;find_comm_in_cmdline=1;strip_exe_from_cmdline=1;show_merged_command=0;header_margin=1;screen_tabs=0;detailed_cpu_time=1;cpu_count_from_one=0;show_cpu_usage=1;show_cpu_frequency=1;show_cpu_temperature=1;degree_fahrenheit=0;update_process_names=0;account_guest_in_cpu_meter=0;color_scheme=0;enable_mouse=1;delay=5;hide_function_bar=1;header_layout=two_50_50;column_meters_0=LeftCPUs2 Blank CPU CPU CPU Blank Memory Memory Memory Swap Blank PressureStallCPUSome PressureStallMemorySome PressureStallMemoryFull PressureStallIOSome PressureStallIOFull PressureStallIRQFull;column_meter_modes_0=1 2 3 1 2 2 3 1 2 2 2 2 2 2 2 2 2;column_meters_1=RightCPUs2 Blank DiskIO DiskIO Blank Blank NetworkIO NetworkIO Blank Tasks LoadAverage Uptime Blank System Systemd Hostname DateTime;column_meter_modes_1=1 2 3 2 2 2 3 2 2 2 2 2 2 2 2 2 2;tree_view=1;sort_key=47;tree_sort_key=0;sort_direction=-1;tree_sort_direction=1;tree_view_always_by_pid=1;all_branches_collapsed=0;screen:Main=PID USER NICE SCHEDULERPOLICY STATE PERCENT_CPU PERCENT_MEM M_RESIDENT OOM IO_RATE STARTTIME ELAPSED TIME Command;.sort_key=PERCENT_MEM;.tree_sort_key=PID;.tree_view_always_by_pid=1;.tree_view=1;.sort_direction=-1;.tree_sort_direction=1;.all_branches_collapsed=0;screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE SYSCR SYSCW RCHAR WCHAR Command;.sort_key=IO_RATE;.tree_sort_key=PID;.tree_view_always_by_pid=0;.tree_view=1;.sort_direction=-1;.tree_sort_direction=1;.all_branches_collapsed=0;

Backtrace information:
----------------------
htop(+0x1912b)[0x55bbd6ae212b]
htop(CRT_handleSIGSEGV+0xf6)[0x55bbd6ae2426]
/lib/x86_64-linux-gnu/libc.so.6(+0x3f590)[0x7f4134cb8590]
htop(Table_rebuildPanel+0x88)[0x55bbd6af76d8]
htop(ScreenManager_run+0x523)[0x55bbd6af26d3]
htop(CommandLine_run+0x7d5)[0x55bbd6ae0a45]
/lib/x86_64-linux-gnu/libc.so.6(+0x29c8a)[0x7f4134ca2c8a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85)[0x7f4134ca2d45]
htop(_start+0x21)[0x55bbd6adbc41]

To make the above information more practical to work with, please also provide a disassembly of your htop binary. This can usually be done by running the following command:

   

Please include the generated file in your report.
Running this program with debug symbols or inside a debugger may provide further insights.

Thank you for helping to improve htop!

Speicherzugriffsfehler

Since it asks so nicely to report this issue here I am.

Requested information:

  • htop version: 3.3.0
  • uname -a: Linux 6.7.12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.7.12-1 (2024-04-24) x86_64 GNU/Linux
  • lsb_release -a:
    No LSB modules are available.
    Distributor ID: Debian
    Description:    Debian GNU/Linux trixie/sid
    Release:        n/a
    Codename:       trixie```
    
    

Also fyi

  • uptime: up 40 days, 23:29
  • have about ~215 tasks / ~3500 threads running
  • load average ~80
  • hardware: Intel Xeon E5-2620 v3 (24) @ 3.200GHz with 128GB ECC RAM

Steps:
I can't 100% replay it but here is the rough outline.

  1. I hid the headers using #
  2. I paused using Z
  3. I used F3 to jump to an ffmpeg command
  4. I pressed SHIFT + H to enable children
  5. I used c to select the ffmpeg process and all the children
  6. I used F8 to increase nice to 19
  7. I used Y to change the scheduling policy to IDLE
  8. I think after that it crashed. It did finish settting the scheduling policy though.

htop.objdump

@BenBE BenBE added bug 🐛 Something isn't working Linux 🐧 Linux related issues labels Jul 26, 2024
@BenBE
Copy link
Member

BenBE commented Jul 26, 2024

Okay, thank you for your report. Based on the provided information I could locate the issue to be caused in the following section of code (Table.c, function Table_rebuildPanel), around here):

   const int rowCount = Vector_size(this->displayList);
   bool foundFollowed = false;
   int idx = 0;

   for (int i = 0; i < rowCount; i++) {
      Row* row = (Row*) Vector_get(this->displayList, i);

      if ( !row->show || (Row_matchesFilter(row, this) == true) ) // <-- Crash happens preparing the call of Row_matchesFilter
         continue;

Row_matchesFilter is a macro which expands to:

#define As_Row(this_)  ((const RowClass*)((this_)->super.klass))

#define Row_matchesFilter(r_, t_)  (As_Row(r_)->matchesFilter ? (As_Row(r_)->matchesFilter(r_, t_)) : false)

For this to crash As_Row(this_) has to return NULL.

@BenBE BenBE added this to the 3.4.0 milestone Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working Linux 🐧 Linux related issues
Projects
None yet
Development

No branches or pull requests

2 participants