Segmentation fault (core dumped) mean?

I installed manjaro’s pamac application on to my system and it’s been working great. Until recently going now for weeks. The pamac icon stays “RED” now, signaling to update. Even after I input these commands "pamac upgrade -a " My four applications won’t roll over the current release applications. The output is listed below.

Preparing…
Checking snapd dependencies…
Checking vscodium-bin dependencies…
Checking archlinux-appstream-data-pamac dependencies…
Checking onlyoffice-bin dependencies…
Synchronizing package databases…
Resolving dependencies…
Checking inter-conflicts…
Segmentation fault (core dumped)

I searched the internet for answers and several answers pop up, none of them answering my specific question. Is there a solution to this?

Seg faults are usually the result of a C++ program erroring out. Typically, these problems are out of your control and need to be fixed by the programme/package maintainer.

Have you tried reinstalling pamac using pacman?

3 Likes

Segmentation fault happens when a program asks the kernel: “Could I access the memory at this address, please?”, and the kernel replies: “STOP RIGHT THERE CRIMINAL SCUM!” :rofl:

The program then panics and typically interrupts execution, and dumps the core so that it could be debugged post mortem. Though if programmed to do so, a program could certainly recover from segfault and continue execution, but most of the time you don’t want to do that as a programmer: accessing a part of the memory that you’re not allowed to is a serious error, that could have serious security implications, so you typically want your program to crash.

The typical reason why a program tries to access a memory location to which it is not entitled is a programmer error. Usually, you get an index of an array go beyond the end of the array and you try to read from or write to a part of memory which does not contain that array.

Or a programmer forgets to check whether a pointer is NULL and then dereferences it… Every C programmer has done that a million times…

Here is a fairly minimal example in C:

/* A program that does nothing but segfaults. */
int main(void) {
    int* p = 0; // declare p to be a pointer that points to nothing
    *p = 1;     // write 1 to memory pointed to by p... STOP RIGHT THERE!
}

If you want to experience it (it’s pretty harmless in this case):

  1. compile it with cc segfaults.c -o segfaults
  2. run it with ./segfaults
  3. ???
  4. Segmentation fault :frowning:
4 Likes

You might want to create a bug report here:

Before doing that, check if it has been reported already…

2 Likes

Partial upgrades can cause this too, accessing libraries that are out of date etc. Make sure your system is up to date.

1 Like

I remove pamac with " yay -R pamac-all " and the configuration files too. "~/.config/pamac ".
Then I rebooted. After that I used " yay -S pamac-aur " to reinstall it. I reinstalled pamac and did the update and everything works. I have a huge smile on my face now. Thank you It worked out.

1 Like

I have to remove pamac completely, including config files also. Then I reinstalled it and now everything works. Everything worked but wouldn’t rollover to the next version of the application.

Thank you for the heads up. I’m occasional practicing c programming. But not really focused on it. Sum concepts of it loses me. Sorta confuses me, I see where python was going for.

Oh good Lord, Python is just awful… Can you even make a segmentation fault in pure Python?

I’ve made sum documentation or notes of it. Hopefully sum people can follow it.

It’s worded differently, and you have sum idea of what is going on. Versus C programming to a beginner like me wouldn’t understand just yet.

I know what Python is, I even wrote Python code myself (under duress, of course, not willingly).

It’s a language in which invisible characters (like tabs and spaces) can not only produce compile errors, but also syntactically valid code with runtime errors which are extremely difficult to debug.

It’s also slow.

I hate it :rofl: