Segmentation fault - how I fixed it

Segmentation fault - or Segmentation fault (core dump).
When you experience this - which can be thrown by any service, software og deamon on your Linux host, just restart the server to get back to working order. However, this most likely occurs due to exchausted resources on the host, so you should be aware of a few things, albeit exchausted resources is not always the only possible cullprit.

  1. If this happens frequently you need to investigate what eats up your resources or add more to your server.
  2. If this has happened only once, then keep an eye out for any new occurances and adjust a few things to opimize resource consuption.

Be warned that this faulty state is not always triggered by eating up all the resouces of a host system, so try with a restart first and if that does not help, you need to monitor resource consumption (top or htop is good) or look in log files for the services or component failing.
I have had this state once in 10 years, and a restart did the trick for me.

For me, this sounds more like a workaround. Normally, you should configure the memory consumption limits in a way to avoid such problems.

Yeah. That is also what I write. For me, this has happened once. It was due to cron jobs and backup routines running at the same time as I also ran AV scan. As I write: If this happens once or twice in years between, it is probably not worth the effort to try and fix. However if happening more frequently, you need to identify what eats your resources and adjust your settings. The restart is needed in both occasions anyway.

Same here as well for me today:

bus error (core dumped) nextcloud

gdb gives me:

[New Thread 0x77a90c8126c0 (LWP 5013)]
[New Thread 0x77a8f7fff6c0 (LWP 5014)]
[New Thread 0x77a8f77fe6c0 (LWP 5015)]
[New Thread 0x77a8f6ffd6c0 (LWP 5016)]
[New Thread 0x77a8f67fc6c0 (LWP 5017)]
[New Thread 0x77a8f5c496c0 (LWP 5019)]
[New Thread 0x77a8f4a046c0 (LWP 5020)]
[New Thread 0x77a8df7a76c0 (LWP 5021)]
[New Thread 0x77a8dec1a6c0 (LWP 5022)]
[New Thread 0x77a8de4196c0 (LWP 5023)]
[New Thread 0x77a8ddc186c0 (LWP 5024)]
terminate called after throwing an instance of ‘std::bad_alloc’
what(): std::bad_alloc

Thread 8 “Thread (pooled)” received signal SIGABRT, Aborted.
[Switching to Thread 0x77a8f77fe6c0 (LWP 5015)]
__pthread_kill_implementation (no_tid=0, signo=6, threadid=) at ./nptl/pthread_kill.c:44
warning: 44 ./nptl/pthread_kill.c: No such file or directory
(gdb) c
Continuing.
Couldn’t get registers: No such process.
(gdb) [Thread 0x77a8ddc186c0 (LWP 5024) exited]
[Thread 0x77a8de4196c0 (LWP 5023) exited]
[Thread 0x77a8dec1a6c0 (LWP 5022) exited]
[Thread 0x77a8df7a76c0 (LWP 5021) exited]
[Thread 0x77a8f4a046c0 (LWP 5020) exited]
[Thread 0x77a8f5c496c0 (LWP 5019) exited]
[Thread 0x77a8f67fc6c0 (LWP 5017) exited]
[Thread 0x77a8f6ffd6c0 (LWP 5016) exited]
[Thread 0x77a8f77fe6c0 (LWP 5015) exited]
[Thread 0x77a8f7fff6c0 (LWP 5014) exited]
[Thread 0x77a90c8126c0 (LWP 5013) exited]
[Thread 0x77a90d9586c0 (LWP 5011) exited]
[Thread 0x77a90e1596c0 (LWP 5010) exited]
[Thread 0x77a90fb076c0 (LWP 5009) exited]
[Thread 0x77a91296ac80 (LWP 5006) exited]
[Thread 0x77a90d1576c0 (LWP 5012) exited]
[New process 5006]

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.

  • Nextcloud version 34.0.1-20260805.074743.364596d2ca-1.0~noble1
  • Linux Mint (Ubuntu based distro)
  • Server is running 34.0.2