Linux bus error core dumped

I am using ubuntu and trying to put my code on github but when I tried using the "git add ." command , I got an error "Bus error (core dumped)". joannah@joannah-Inspiron-N5040:~/Macerdo$ git init

I am using ubuntu and trying to put my code on github but when I tried using the «git add .» command , I got an error «Bus error (core dumped)».

joannah@joannah-Inspiron-N5040:~/Macerdo$ git init
Initialized empty Git repository in /home/joannah/Macerdo/.git/
joannah@joannah-Inspiron-N5040:~/Macerdo$ git add .
Bus error (core dumped)
joannah@joannah-Inspiron-N5040:~/Macerdo$ 

I will appreciate any help.

asked Oct 29, 2014 at 9:59

Joannah Nanjekye's user avatar

3

This is how I solved this problem, assuming you can still run git diff:

  1. Generate a diff patch
  2. Remove repo
  3. Clone repo again
  4. Apply patch
git diff --patch > /tmp/patch.diff
cd ..
rm -rf my_repo
git clone <my_repo>
cd my_repo
patch -p1 /tmp/patch.diff

answered Sep 20, 2016 at 18:18

ichigolas's user avatar

For future reference .I solved this by creating a new folder and putting all my project files there and when I did a «git add .» and «git commit» it worked but I still do not know why the former failed to work. The good thing is at least I got a solution and moved on. That is most important. Thanks for the contributions.

answered Nov 3, 2014 at 8:45

Joannah Nanjekye's user avatar

Have a look at dmesg. In my case this was due to a hardware error: A bad sector on my disk. :(

This might explain why the command worked after copying the files.

You should find something like this:

[ 1387.312569] ata3.00: exception Emask 0x0 SAct 0x800 SErr 0x0 action 0x0
[ 1387.314589] ata3.00: irq_stat 0x40000008
[ 1387.316618] ata3.00: failed command: READ FPDMA QUEUED
[ 1387.318638] ata3.00: cmd 60/08:58:48:1e:54/00:00:12:00:00/40 tag 11 ncq 4096 in
                        res 41/40:00:4b:1e:54/00:00:12:00:00/40 Emask 0x409 (media error) <F>
[ 1387.322675] ata3.00: status: { DRDY ERR }
[ 1387.324690] ata3.00: error: { UNC }
[ 1387.363352] ata3.00: configured for UDMA/133
[ 1387.363369] sd 2:0:0:0: [sda] tag#11 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1387.363375] sd 2:0:0:0: [sda] tag#11 Sense Key : Medium Error [current] [descriptor]
[ 1387.363379] sd 2:0:0:0: [sda] tag#11 Add. Sense: Unrecovered read error - auto reallocate failed
[ 1387.363384] sd 2:0:0:0: [sda] tag#11 CDB: Read(10) 28 00 12 54 1e 48 00 00 08 00
[ 1387.363388] blk_update_request: I/O error, dev sda, sector 307502667
[ 1387.365427] ata3: EH complete

answered Jan 15, 2017 at 21:24

matthias.lukaszek's user avatar

1

This happens to me quite often since my git repo is mounted via nfs, seems it times out and this causes a bus error sometimes.

The solution I found is to simply remove the lock files and continue on my merry way.

find .git -iname *.lock | xargs rm

answered Jun 6, 2018 at 14:07

LaXDragon's user avatar

LaXDragonLaXDragon

6115 silver badges5 bronze badges

In my case, a .py file had been corrupted and I got this message every time I tried to add it to a commit.

Deleting the .git / index.lock replaces the damaged file and everything is back to normal.

answered Jun 29, 2020 at 5:47

Victor Villacorta's user avatar

1

I am using ubuntu and trying to put my code on github but when I tried using the «git add .» command , I got an error «Bus error (core dumped)».

joannah@joannah-Inspiron-N5040:~/Macerdo$ git init
Initialized empty Git repository in /home/joannah/Macerdo/.git/
joannah@joannah-Inspiron-N5040:~/Macerdo$ git add .
Bus error (core dumped)
joannah@joannah-Inspiron-N5040:~/Macerdo$ 

I will appreciate any help.

asked Oct 29, 2014 at 9:59

Joannah Nanjekye's user avatar

3

This is how I solved this problem, assuming you can still run git diff:

  1. Generate a diff patch
  2. Remove repo
  3. Clone repo again
  4. Apply patch
git diff --patch > /tmp/patch.diff
cd ..
rm -rf my_repo
git clone <my_repo>
cd my_repo
patch -p1 /tmp/patch.diff

answered Sep 20, 2016 at 18:18

ichigolas's user avatar

For future reference .I solved this by creating a new folder and putting all my project files there and when I did a «git add .» and «git commit» it worked but I still do not know why the former failed to work. The good thing is at least I got a solution and moved on. That is most important. Thanks for the contributions.

answered Nov 3, 2014 at 8:45

Joannah Nanjekye's user avatar

Have a look at dmesg. In my case this was due to a hardware error: A bad sector on my disk. :(

This might explain why the command worked after copying the files.

You should find something like this:

[ 1387.312569] ata3.00: exception Emask 0x0 SAct 0x800 SErr 0x0 action 0x0
[ 1387.314589] ata3.00: irq_stat 0x40000008
[ 1387.316618] ata3.00: failed command: READ FPDMA QUEUED
[ 1387.318638] ata3.00: cmd 60/08:58:48:1e:54/00:00:12:00:00/40 tag 11 ncq 4096 in
                        res 41/40:00:4b:1e:54/00:00:12:00:00/40 Emask 0x409 (media error) <F>
[ 1387.322675] ata3.00: status: { DRDY ERR }
[ 1387.324690] ata3.00: error: { UNC }
[ 1387.363352] ata3.00: configured for UDMA/133
[ 1387.363369] sd 2:0:0:0: [sda] tag#11 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1387.363375] sd 2:0:0:0: [sda] tag#11 Sense Key : Medium Error [current] [descriptor]
[ 1387.363379] sd 2:0:0:0: [sda] tag#11 Add. Sense: Unrecovered read error - auto reallocate failed
[ 1387.363384] sd 2:0:0:0: [sda] tag#11 CDB: Read(10) 28 00 12 54 1e 48 00 00 08 00
[ 1387.363388] blk_update_request: I/O error, dev sda, sector 307502667
[ 1387.365427] ata3: EH complete

answered Jan 15, 2017 at 21:24

matthias.lukaszek's user avatar

1

This happens to me quite often since my git repo is mounted via nfs, seems it times out and this causes a bus error sometimes.

The solution I found is to simply remove the lock files and continue on my merry way.

find .git -iname *.lock | xargs rm

answered Jun 6, 2018 at 14:07

LaXDragon's user avatar

LaXDragonLaXDragon

6115 silver badges5 bronze badges

In my case, a .py file had been corrupted and I got this message every time I tried to add it to a commit.

Deleting the .git / index.lock replaces the damaged file and everything is back to normal.

answered Jun 29, 2020 at 5:47

Victor Villacorta's user avatar

1

What happened:

I’m getting Bus error (core dumped) on some images after updating from 1.9 to 1.12.
Firstly, I thought it was my fault, so I completely removed kuberntes from all nodes and reinstalled it.
But it didn’t helped. I thought it was problem with shared memory. I tried to mount some volumes to /dev/shm/, but it didn’t help. On the plain docker at the same host everything works fine. Here are some images, I’ve got issue with:
postgres:9.6.5 — but I guess it’s not problem with this version (docker-library/postgres#451)

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
 The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
 Data page checksums are disabled.
 fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
Bus error (core dumped)
child process exited with exit code 135
initdb: removing contents of data directory "/var/lib/postgresql/data"
running bootstrap script ...

gitlab:gitlab/gitlab-ce:10.3.3-ce.0 — error, at the same place as in postgres, on initdb.
richarvey/nginx-php-fpm — on some images based on this it works fine, but on some not.
webdevops/php-nginx:alpine-php7 — almost like previous, but this one has auto restart, and (omg) it started on 150’th try.:

.....
2018-11-19 21:44:23,484 INFO exited: php-fpmd (terminated by SIGBUS (core dumped); not expected)
2018-11-19 21:44:24,486 INFO spawned: 'php-fpmd' with pid 348
-> Executing /opt/docker/bin/service.d/php-fpm.d//10-init.sh
2018-11-19 21:44:24,494 INFO success: php-fpmd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Setting php-fpm user to application
2018-11-19 21:44:24,683 INFO exited: php-fpmd (terminated by SIGBUS (core dumped); not expected)
2018-11-19 21:44:25,685 INFO spawned: 'php-fpmd' with pid 354
-> Executing /opt/docker/bin/service.d/php-fpm.d//10-init.sh
2018-11-19 21:44:25,695 INFO success: php-fpmd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Setting php-fpm user to application
.....

2018-11-19 21:46:28,206 INFO exited: php-fpmd (terminated by SIGBUS (core dumped); not expected)
2018-11-19 21:46:29,209 INFO spawned: 'php-fpmd' with pid 948
-> Executing /opt/docker/bin/service.d/php-fpm.d//10-init.sh
2018-11-19 21:46:29,220 INFO success: php-fpmd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Setting php-fpm user to application
2018-11-19 21:46:29,417 INFO exited: php-fpmd (terminated by SIGBUS (core dumped); not expected)
2018-11-19 21:46:30,418 INFO spawned: 'php-fpmd' with pid 953
-> Executing /opt/docker/bin/service.d/php-fpm.d//10-init.sh
2018-11-19 21:46:30,423 INFO success: php-fpmd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Setting php-fpm user to application
[19-Nov-2018 21:46:30] NOTICE: fpm is running, pid 953
[19-Nov-2018 21:46:30] NOTICE: ready to handle connections

wordpress — problem on executing php script:

/usr/local/bin/docker-entrypoint.sh: line 242:   181 Bus error               (core dumped) TERM=dumb php --  <<'EOPHP'

And heres is part of the content of this file:

                TERM=dumb php -- <<'EOPHP'
<?php
// database might not exist, so let's try creating it (just to be safe)

$stderr = fopen('php://stderr', 'w');

// https://codex.wordpress.org/Editing_wp-config.php#MySQL_Alternate_Port
//   "hostname:port"
// https://codex.wordpress.org/Editing_wp-config.php#MySQL_Sockets_or_Pipes
//   "hostname:unix-socket-path"
list($host, $socket) = explode(':', getenv('WORDPRESS_DB_HOST'), 2);
$port = 0;
if (is_numeric($socket)) {
        $port = (int) $socket;
        $socket = null;
}
$user = getenv('WORDPRESS_DB_USER');
$pass = getenv('WORDPRESS_DB_PASSWORD');
$dbName = getenv('WORDPRESS_DB_NAME');

$maxTries = 10;
do {
        $mysql = new mysqli($host, $user, $pass, '', $port, $socket);
        if ($mysql->connect_error) {
                fwrite($stderr, "n" . 'MySQL Connection Error: (' . $mysql->connect_errno . ') ' . $mysql->connect_error . "n");
                --$maxTries;
                if ($maxTries <= 0) {
                        exit(1);
                }
                sleep(3);
        }
} while ($mysql->connect_error);

if (!$mysql->query('CREATE DATABASE IF NOT EXISTS `' . $mysql->real_escape_string($dbName) . '`')) {
        fwrite($stderr, "n" . 'MySQL "CREATE DATABASE" Error: ' . $mysql->error . "n");
        $mysql->close();
        exit(1);
}

$mysql->close();
EOPHP
        fi

        # now that we're definitely done writing configuration, let's clear out the relevant envrionment variables (so that stray "phpinfo()" calls don't leak secrets from our code)
        for e in "${envs[@]}"; do
                unset "$e"
        done
fi

exec "$@"

What you expected to happen:

I want to get rid of Core dumped error, like it was on kubernets v1.9

How to reproduce it (as minimally and precisely as possible):

apiVersion: v1
kind: Namespace
metadata:
  name: test
---
apiVersion: v1
kind: Pod
metadata:
  name: postgresql
  namespace: test
  labels:
    app: postgresql
spec:
  nodeSelector:
    kubernetes.io/hostname: md2
  containers:
  - name: postgres
    image: postgres:9.6.5
    ports:
    - containerPort: 5432
      hostPort: 5432
    volumeMounts:
    - mountPath: /dev/shm
      name: dshm
  volumes:
  - name: dshm
#    hostPath:
#      path: /dev/shm
    emptyDir:
      medium: Medium

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"clean", BuildDate:"2018-10-24T06:54:59Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"clean", BuildDate:"2018-10-24T06:43:59Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration:
    Bare metal:

lshw

sudo output:

    description: Rack Mount Chassis
    product: ProLiant DL20 Gen9 (823556-B21)
    vendor: HP
    serial: CZ274504G1
    width: 64 bits
    capabilities: smbios-2.8 dmi-2.8 vsyscall32
    configuration: boot=normal chassis=rackmount family=ProLiant sku=823556-B21 uuid=38323335-3536-435A-3237-343530344731
  *-core
       description: Motherboard
       product: ProLiant DL20 Gen9
       vendor: HP
       physical id: 0
       serial: CZ274504G1
     *-cache:0
          description: L1 cache
          physical id: 0
          slot: L1-Cache
          size: 256KiB
          capacity: 256KiB
          capabilities: synchronous internal write-back unified
          configuration: level=1
     *-cache:1
          description: L2 cache
          physical id: 1
          slot: L2-Cache
          size: 1MiB
          capacity: 1MiB
          capabilities: synchronous internal varies unified
          configuration: level=2
     *-cache:2
          description: L3 cache
          physical id: 2
          slot: L3-Cache
          size: 8MiB
          capacity: 8MiB
          capabilities: synchronous internal varies unified
          configuration: level=3
     *-cpu
          description: CPU
          product: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
          vendor: Intel Corp.
          physical id: 3
          bus info: cpu@0
          version: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
          serial: To Be Filled By O.E.M.
          slot: Proc 1
          size: 940MHz
          capacity: 3900MHz
          width: 64 bits
          clock: 100MHz
          capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp cpufreq
          configuration: cores=4 enabledcores=4 threads=8
     *-firmware
          description: BIOS
          vendor: HP
          physical id: 4
          version: U22
          date: 10/02/2017
          size: 64KiB
          capacity: 15MiB
          capabilities: pci pnp upgrade shadowing escd cdboot bootselect edd int13floppy360 int13floppy1200 int13floppy720 int5printscreen int9keyboard int14serial int17printer int10video acpi usb biosbootspecification netboot uefi
     *-memory
          description: System Memory
          physical id: 6
          slot: System board or motherboard
          size: 64GiB
        *-bank:0
             description: DIMM Synchronous 2133 MHz (0.5 ns)
             product: NOT AVAILABLE
             vendor: UNKNOWN
             physical id: 0
             slot: PROC 1 DIMM 1
             size: 16GiB
             width: 64 bits
             clock: 2133MHz (0.5ns)
        *-bank:1
             description: DIMM Synchronous 2133 MHz (0.5 ns)
             product: NOT AVAILABLE
             vendor: UNKNOWN
             physical id: 1
             slot: PROC 1 DIMM 2
             size: 16GiB
             width: 64 bits
             clock: 2133MHz (0.5ns)
        *-bank:2
             description: DIMM Synchronous 2133 MHz (0.5 ns)
             product: NOT AVAILABLE
             vendor: UNKNOWN
             physical id: 2
             slot: PROC 1 DIMM 3
             size: 16GiB
             width: 64 bits
             clock: 2133MHz (0.5ns)
        *-bank:3
             description: DIMM Synchronous 2133 MHz (0.5 ns)
             product: NOT AVAILABLE
             vendor: UNKNOWN
             physical id: 3
             slot: PROC 1 DIMM 4
             size: 16GiB
             width: 64 bits
             clock: 2133MHz (0.5ns)
     *-pci
          description: Host bridge
          product: Intel Corporation
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 05
          width: 32 bits
          clock: 33MHz
        *-usb
             description: USB controller
             product: Sunrise Point-H USB 3.0 xHCI Controller
             vendor: Intel Corporation
             physical id: 14
             bus info: pci@0000:00:14.0
             version: 31
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi xhci bus_master cap_list
             configuration: driver=xhci_hcd latency=0
             resources: iomemory:2f0-2ef irq:27 memory:2ffff00000-2ffff0ffff
           *-usbhost:0
                product: xHCI Host Controller
                vendor: Linux 4.4.0-104-lowlatency xhci-hcd
                physical id: 0
                bus info: usb@3
                logical name: usb3
                version: 4.04
                capabilities: usb-3.00
                configuration: driver=hub slots=6 speed=5000Mbit/s
           *-usbhost:1
                product: xHCI Host Controller
                vendor: Linux 4.4.0-104-lowlatency xhci-hcd
                physical id: 1
                bus info: usb@2
                logical name: usb2
                version: 4.04
                capabilities: usb-2.00
                configuration: driver=hub slots=12 speed=480Mbit/s
              *-usb
                   description: USB hub
                   product: Hub
                   vendor: Standard Microsystems Corp.
                   physical id: 3
                   bus info: usb@2:3
                   version: 8.01
                   capabilities: usb-2.00
                   configuration: driver=hub maxpower=2mA slots=2 speed=480Mbit/s
        *-communication UNCLAIMED
             description: Communication controller
             product: Sunrise Point-H CSME HECI #1
             vendor: Intel Corporation
             physical id: 16
             bus info: pci@0000:00:16.0
             version: 31
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi bus_master cap_list
             configuration: latency=0
             resources: iomemory:2f0-2ef memory:2ffff11000-2ffff11fff
        *-storage
             description: SATA controller
             product: Sunrise Point-H SATA controller [AHCI mode]
             vendor: Intel Corporation
             physical id: 17
             bus info: pci@0000:00:17.0
             version: 31
             width: 32 bits
             clock: 66MHz
             capabilities: storage msi pm ahci_1.0 bus_master cap_list
             configuration: driver=ahci latency=0
             resources: irq:28 memory:92c80000-92c87fff memory:92c8c000-92c8c0ff ioport:2040(size=8) ioport:2048(size=4) ioport:2020(size=32) memory:92c00000-92c7ffff
        *-pci:0
             description: PCI bridge
             product: Sunrise Point-H PCI Express Root Port #9
             vendor: Intel Corporation
             physical id: 1d
             bus info: pci@0000:00:1d.0
             version: f1
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:25 ioport:1000(size=4096) memory:90000000-92afffff
           *-generic:0 UNCLAIMED
                description: System peripheral
                product: Integrated Lights-Out Standard Slave Instrumentation & System Support
                vendor: Hewlett-Packard Company
                physical id: 0
                bus info: pci@0000:01:00.0
                version: 06
                width: 32 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list
                configuration: latency=0
                resources: ioport:1200(size=256) memory:92a8d000-92a8d1ff ioport:1100(size=256)
           *-display UNCLAIMED
                description: VGA compatible controller
                product: MGA G200EH
                vendor: Matrox Electronics Systems Ltd.
                physical id: 0.1
                bus info: pci@0000:01:00.1
                version: 01
                width: 32 bits
                clock: 33MHz
                capabilities: pm msi pciexpress vga_controller bus_master cap_list
                configuration: latency=0
                resources: memory:91000000-91ffffff memory:92a88000-92a8bfff memory:92000000-927fffff
           *-generic:1
                description: System peripheral
                product: Integrated Lights-Out Standard Management Processor Support and Messaging
                vendor: Hewlett-Packard Company
                physical id: 0.2
                bus info: pci@0000:01:00.2
                version: 06
                width: 32 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list
                configuration: driver=hpilo latency=0
                resources: irq:17 ioport:1000(size=256) memory:92a8c000-92a8c0ff memory:92900000-929fffff memory:92a00000-92a7ffff memory:92a80000-92a87fff memory:92800000-928fffff
           *-usb
                description: USB controller
                product: Integrated Lights-Out Standard Virtual USB Controller
                vendor: Hewlett-Packard Company
                physical id: 0.4
                bus info: pci@0000:01:00.4
                version: 03
                width: 32 bits
                clock: 33MHz
                capabilities: msi pciexpress pm uhci bus_master cap_list
                configuration: driver=uhci_hcd latency=0
                resources: irq:17 ioport:1300(size=32)
              *-usbhost
                   product: UHCI Host Controller
                   vendor: Linux 4.4.0-104-lowlatency uhci_hcd
                   physical id: 1
                   bus info: usb@1
                   logical name: usb1
                   version: 4.04
                   capabilities: usb-1.10
                   configuration: driver=hub slots=2 speed=12Mbit/s
        *-pci:1
             description: PCI bridge
             product: Sunrise Point-H PCI Express Root Port #11
             vendor: Intel Corporation
             physical id: 1d.2
             bus info: pci@0000:00:1d.2
             version: f1
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:26 memory:fe800000-fe8fffff ioport:92b00000(size=1048576)
           *-network:0
                description: Ethernet interface
                product: NetXtreme BCM5720 Gigabit Ethernet PCIe
                vendor: Broadcom Corporation
                physical id: 0
                bus info: pci@0000:02:00.0
                logical name: eno1
                version: 00
                serial: ec:eb:b8:5d:5a:e8
                size: 1Gbit/s
                capacity: 1Gbit/s
                width: 64 bits
                clock: 33MHz
                capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 duplex=full firmware=5720-v1.39 NCSI v1.4.16.0 ip=89.184.66.47 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
                resources: irq:18 memory:92b30000-92b3ffff memory:92b40000-92b4ffff memory:92b50000-92b5ffff memory:fe800000-fe83ffff
           *-network:1 DISABLED
                description: Ethernet interface
                product: NetXtreme BCM5720 Gigabit Ethernet PCIe
                vendor: Broadcom Corporation
                physical id: 0.1
                bus info: pci@0000:02:00.1
                logical name: eno2
                version: 00
                serial: ec:eb:b8:5d:5a:e9
                capacity: 1Gbit/s
                width: 64 bits
                clock: 33MHz
                capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=5720-v1.39 NCSI v1.4.16.0 latency=0 link=no multicast=yes port=twisted pair
                resources: irq:19 memory:92b00000-92b0ffff memory:92b10000-92b1ffff memory:92b20000-92b2ffff memory:fe840000-fe87ffff
        *-isa
             description: ISA bridge
             product: Sunrise Point-H LPC Controller
             vendor: Intel Corporation
             physical id: 1f
             bus info: pci@0000:00:1f.0
             version: 31
             width: 32 bits
             clock: 33MHz
             capabilities: isa bus_master
             configuration: latency=0
        *-memory UNCLAIMED
             description: Memory controller
             product: Sunrise Point-H PMC
             vendor: Intel Corporation
             physical id: 1f.2
             bus info: pci@0000:00:1f.2
             version: 31
             width: 32 bits
             clock: 33MHz (30.3ns)
             capabilities: bus_master
             configuration: latency=0
             resources: memory:92c88000-92c8bfff
        *-serial
             description: SMBus
             product: Sunrise Point-H SMBus
             vendor: Intel Corporation
             physical id: 1f.4
             bus info: pci@0000:00:1f.4
             version: 31
             width: 64 bits
             clock: 33MHz
             configuration: driver=i801_smbus latency=0
             resources: iomemory:2f0-2ef irq:16 memory:2ffff10000-2ffff100ff ioport:efa0(size=32)
     *-scsi:0
          physical id: 5
          logical name: scsi0
          capabilities: emulated
        *-disk
             description: ATA Disk
             product: ST1000DM010-2EP1
             vendor: Seagate
             physical id: 0.0.0
             bus info: scsi@0:0.0.0
             logical name: /dev/sda
             version: CC43
             serial: Z9A8H9QD
             size: 931GiB (1TB)
             capabilities: partitioned partitioned:dos
             configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096 signature=1bde66a3
           *-volume:0
                description: EXT4 volume
                vendor: Linux
                physical id: 1
                bus info: scsi@0:0.0.0,1
                logical name: /dev/sda1
                version: 1.0
                serial: c519e927-efc2-457b-a2b3-e9936253909d
                size: 237MiB
                capacity: 237MiB
                capabilities: primary bootable multi journaled extended_attributes large_files huge_files dir_nlink extents ext4 ext2 initialized
                configuration: created=2017-12-29 18:59:23 filesystem=ext4 modified=2017-12-29 18:59:23 state=clean
           *-volume:1
                description: Linux swap volume
                physical id: 2
                bus info: scsi@0:0.0.0,2
                logical name: /dev/sda2
                version: 1
                serial: d3552ee3-1cf8-4af9-ab61-9d391485a57f
                size: 119GiB
                capacity: 119GiB
                capabilities: primary multi swap initialized
                configuration: filesystem=swap pagesize=4096
           *-volume:2
                description: EXT4 volume
                vendor: Linux
                physical id: 3
                bus info: scsi@0:0.0.0,3
                logical name: /dev/sda3
                version: 1.0
                serial: d34dfb91-afe5-4074-b5ce-56fd14cf7830
                size: 372GiB
                capacity: 372GiB
                capabilities: primary multi journaled extended_attributes large_files huge_files dir_nlink extents ext4 ext2 initialized
                configuration: created=2017-12-29 19:00:47 filesystem=ext4 modified=2017-12-29 19:00:47 state=clean
           *-volume:3
                description: EXT4 volume
                vendor: Linux
                physical id: 4
                bus info: scsi@0:0.0.0,4
                logical name: /dev/sda4
                version: 1.0
                serial: 0d7301bc-6882-4770-8a97-6065e504e193
                size: 439GiB
                capacity: 439GiB
                capabilities: primary multi journaled extended_attributes large_files huge_files dir_nlink extents ext4 ext2 initialized
                configuration: created=2017-12-29 19:00:49 filesystem=ext4 modified=2017-12-29 19:00:49 state=clean
     *-scsi:1
          physical id: 7
          logical name: scsi1
          capabilities: emulated
        *-disk
             description: ATA Disk
             product: ST1000DM010-2EP1
             vendor: Seagate
             physical id: 0.0.0
             bus info: scsi@1:0.0.0
             logical name: /dev/sdb
             version: CC43
             serial: Z9A8D6CD
             size: 931GiB (1TB)
             capabilities: partitioned partitioned:dos
             configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096 signature=e01a79e7
           *-volume:0
                description: EXT4 volume
                vendor: Linux
                physical id: 1
                bus info: scsi@1:0.0.0,1
                logical name: /dev/sdb1
                version: 1.0
                serial: 2af99ccb-f00f-4c0f-8eaa-ede0c4e2f769
                size: 237MiB
                capacity: 237MiB
                capabilities: primary bootable multi journaled extended_attributes large_files huge_files dir_nlink extents ext4 ext2 initialized
                configuration: created=2017-12-29 18:59:23 filesystem=ext4 modified=2017-12-29 18:59:23 state=clean
           *-volume:1
                description: Linux swap volume
                physical id: 2
                bus info: scsi@1:0.0.0,2
                logical name: /dev/sdb2
                version: 1
                serial: 7e221fb2-312c-4af3-b7c5-5c1e26c1d3ad
                size: 119GiB
                capacity: 119GiB
                capabilities: primary multi swap initialized
                configuration: filesystem=swap pagesize=4096
           *-volume:2
                description: EXT4 volume
                vendor: Linux
                physical id: 3
                bus info: scsi@1:0.0.0,3
                logical name: /dev/sdb3
                version: 1.0
                serial: bf7c2da4-0621-46b4-9ffc-d93a446ff606
                size: 372GiB
                capacity: 372GiB
                capabilities: primary multi journaled extended_attributes large_files huge_files dir_nlink extents ext4 ext2 initialized
                configuration: created=2017-12-29 19:02:59 filesystem=ext4 modified=2017-12-29 19:02:59 state=clean
           *-volume:3
                description: EXT4 volume
                vendor: Linux
                physical id: 4
                bus info: scsi@1:0.0.0,4
                logical name: /dev/sdb4
                version: 1.0
                serial: ca144958-7752-48b4-b33a-05fac0c3dd68
                size: 439GiB
                capacity: 439GiB
                capabilities: primary multi journaled extended_attributes large_files huge_files dir_nlink extents ext4 ext2 initialized
                configuration: created=2017-12-29 19:03:01 filesystem=ext4 modified=2017-12-29 19:03:01 state=clean
     *-scsi:2
          physical id: 8
          logical name: scsi4
          capabilities: emulated
        *-disk
             description: ATA Disk
             product: Samsung SSD 850
             physical id: 0.0.0
             bus info: scsi@4:0.0.0
             logical name: /dev/sdc
             version: 4B6Q
             serial: S39KNX0J745113J
             size: 238GiB (256GB)
             capabilities: partitioned partitioned:dos
             configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=2dfc3098
           *-volume
                description: EXT4 volume
                vendor: Linux
                physical id: 1
                bus info: scsi@4:0.0.0,1
                logical name: /dev/sdc1
                logical name: /db/ssd
                version: 1.0
                serial: 85e87f84-1b0b-42f9-8782-f8d09df568c2
                size: 238GiB
                capacity: 238GiB
                capabilities: primary journaled extended_attributes large_files huge_files dir_nlink recover extents ext4 ext2 initialized
                configuration: created=2017-12-29 18:59:33 filesystem=ext4 lastmountpoint=/db/ssd modified=2018-11-17 02:23:09 mount.fstype=ext4 mount.options=rw,relatime,data=ordered mounted=2018-11-17 02:23:09 state=mounted
  *-power UNCLAIMED
       description: Power Supply 1
       vendor: HP
       physical id: 1
       capacity: 32768mWh
  *-network
       description: Ethernet interface
       physical id: 2
       logical name: flannel.1
       serial: f6:18:0a:c3:f2:77
       capabilities: ethernet physical
       configuration: broadcast=yes driver=vxlan driverversion=0.1 ip=10.244.0.0 link=yes multicast=yes
  • OS (e.g. from /etc/os-release):
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
  • Kernel (e.g. uname -a):
    Linux md1 4.4.0-104-lowlatency Configurable restart behavior #127-Ubuntu SMP PREEMPT Mon Dec 11 13:07:12 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
    kubeadm
  • Others:

/kind bug
/sig app
/sig release

Содержание

  1. Arch Linux
  2. #1 2013-05-08 22:28:13
  3. A hint regarding applications failing with: «Bus error (core dumped)»
  4. «Bus error (core dumped)» on ‘go’ command #34
  5. Comments
  6. Bus error (core dumped) #1857
  7. Comments
  8. Issue with Ubuntu 16.04 GPU install: Bus error (core dumped) #7663
  9. Comments
  10. Any idea why the above ‘Bus error’ is happening? Thanks a lot!
  11. Program crash messages
  12. Contents
  13. Segfault, Bus Error, Abort, and such
  14. Segfault
  15. Bus error
  16. Aborted (core dumped)
  17. On core dumps
  18. Illegal instruction (core dumped)

Arch Linux

You are not logged in.

#1 2013-05-08 22:28:13

A hint regarding applications failing with: «Bus error (core dumped)»

This happens to me sometimes, for the solution see at the end of this posting after the description of the error.

From GUI
I try to start an application (it might be that this only concerns gtk applications such as evince & gthumb but I don’t know). The application does not start, instead I am told by my GUI (e17) ‘XXXX (the application) stopped running unexpectedly. There was no error message. This error log will be saved as /home/. ‘. This error message matches the various joke error messages concocted by Microsoft in unhelpfulness. The log is not saved.

From Terminal
I try to start it from the terminal. The terminal tells me ‘Bus error (core dumped)’. Nothing more. I could not find any coredump — though the journalctl log does at least know about this: «May 09 02:03:07 xxxxxx systemd-coredump[9439]: Process 9436 (XXXX) dumped core.» Running the application with strace is also not very helpful, though it hints that it all has to do with dconf: «open(«/etc/dconf/profile/user», O_RDONLY) = -1 ENOENT (No such file or directory) (. ) open(«/home/xxxxx/.config/dconf/user», O_RDONLY) = 11″

Google searches etc.
Not helpful. But then again: who is going to talk about google any more in just a couple of years.

Solution
remove /home/ /.config/dconf/user
you might want to back it up somewhere; I have no idea what this file is and if you still might need it (guess not, but anyway).
It’s not a regular file or directory, not a link and not a node. In the list command (ls) it appears like a regular file but you can’t read from it (gives I/O error). Google: not helpful. Man page of dconf: self referential (‘dconf — Simple tool for manipulating a dconf database’) So my best guess is that dconf somehow is used to produce something that is involved in (hardware?) BUS handling which it chooses to store in

/.config/dconf/ and which is not trivially understandable by simple minds like me.

We are exactly the people our parents always warned us about.

Источник

«Bus error (core dumped)» on ‘go’ command #34

I finally managed to run the executable (the Linux GPU version; Ubuntu 19.04) without startup errors and I should have put the models in the right place, but the UCI go makes this happen:

Many other UCI commands result in an error. For example, ucinewgame results in a segfault:

And isready returns a big error:

LogMessageFatal()+0x43) [0x56357cc34483] [bt] (1) ./libmxnet.so(mxnet::engine::ThreadedEngine::PushAsync(std::function , mxnet::Context, std::vector > const&, std::vector > const&, mxnet::FnProperty, int, char const*, bool)+0x527) [0x7f4792341d87] [bt] (2) ./libmxnet.so(mxnet::CopyFromTo(mxnet::NDArray const&, mxnet::NDArray const&, int, bool)+0x8b0) [0x7f47924b7100] [bt] (3) ./libmxnet.so(mxnet::imperative::PushFComputeEx(std::function > const&, std::vector > const&, std::vector > const&)> const&, nnvm::Op const*, nnvm::NodeAttrs const&, mxnet::Context const&, std::vector > const&, std::vector > const&, std::vector > const&, std::vector > const&, std::vector > const&, std::vector > const&)::::operator()(mxnet::RunContext) const+0x9e) [0x7f47923e275e] [bt] (4) ./libmxnet.so(mxnet::imperative::PushFComputeEx(std::function > const&, std::vector > const&, std::vector > const&)> const&, nnvm::Op const*, nnvm::NodeAttrs const&, mxnet::Context const&, std::vector > const&, std::vector > const&, std::vector > const&, std::vector > const&, std::vector > const&, std::vector > const&)+0x3cc) [0x7f47923ea07c] [bt] (5) ./libmxnet.so(mxnet::Imperative::InvokeOp(mxnet::Context const&, nnvm::NodeAttrs const&, std::vector > const&, std::vector > const&, std::vector > const&, mxnet::DispatchMode, mxnet::OpStatePtr)+0xa9f) [0x7f47923d611f] [bt] (6) ./libmxnet.so(mxnet::Imperative::Invoke(mxnet::Context const&, nnvm::NodeAttrs const&, std::vector > const&, std::vector > const&)+0x36a) [0x7f47923d6b6a] [bt] (7) ./libmxnet.so(MXImperativeInvokeImpl(void*, int, void**, int*, void***, int, char const**, char const**)+0x9f8) [0x7f47922940b8] [bt] (8) ./libmxnet.so(MXImperativeInvoke+0x4c) [0x7f4792294ebc] Stack trace: [bt] (0) ./CrazyAra(dmlc::LogMessageFatal::

LogMessageFatal()+0x43) [0x56357cc34483] [bt] (1) ./CrazyAra(mxnet::cpp::Operator::Invoke(std::vector >&)+0x583) [0x56357cc38fb3] [bt] (2) ./CrazyAra(mxnet::cpp::Operator::Invoke(mxnet::cpp::NDArray&)+0x9f) [0x56357cc3939f] [bt] (3) ./CrazyAra(mxnet::cpp::NDArray::Copy(mxnet::cpp::Context const&) const+0xbd) [0x56357cc6247d] [bt] (4) ./CrazyAra(NeuralNetAPI::load_parameters(std::__cxx11::basic_string , std::allocator > const&)+0x592) [0x56357cc5cad2] [bt] (5) ./CrazyAra(NeuralNetAPI::NeuralNetAPI(std::__cxx11::basic_string , std::allocator > const&, unsigned int, std::__cxx11::basic_string , std::allocator > const&)+0x433) [0x56357cc5e463] [bt] (6) ./CrazyAra(CrazyAra::is_ready()+0x809) [0x56357cc31449] [bt] (7) ./CrazyAra(CrazyAra::uci_loop(int, char**)+0x8ed) [0x56357cc3364d] [bt] (8) ./CrazyAra(main+0x4b) [0x56357cb427fb] Aborted (core dumped)»>

The text was updated successfully, but these errors were encountered:

Источник

Bus error (core dumped) #1857

Whenever I run the ember command I get a: Bus error (core dumped). I’ve tried with both v7.3.0 and v7.4.0 of node.js with the same results. When I downgrade to node v6.9.4 the error goes away. So this is probably an issue with new code in the node 7.x branch. I’ll open a bug there referencing this as well.

Output from ember version —verbose && npm —version :

The text was updated successfully, but these errors were encountered:

Can you get s stack backtrace with gdb ?

same issue with yarn install
error /home/jhipster/app/node_modules/node-sass: Command failed.
Exit code: 135
Command: sh
Arguments: -c node scripts/build.js
Directory: /home/jhipster/app/node_modules/node-sass
Output:
Binary found at /home/jhipster/app/node_modules/node-sass/vendor/linux-x64-48/binding.node
Testing binary
Bus error (core dumped)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

then I tryed npm:
Bus error (core dumped)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted <«os»:»darwin»,»arch»:»any»>(current: <«os»:»linux»,»arch»:»x64″>)
npm ERR! Linux 4.2.0-16-generic
npm ERR! argv «/usr/bin/nodejs» «/usr/bin/npm» «install» «node-sass» «—registry=https://registry.npm.taobao.org»
npm ERR! node v6.9.5
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 135

npm ERR! node-sass@4.4.0 postinstall: node scripts/build.js
npm ERR! Exit status 135
npm ERR!
npm ERR! Failed at the node-sass@4.4.0 postinstall script ‘node scripts/build.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.

building your project
using yarn
warning fsevents@1.1.1: The platform «linux» is incompatible with this module.
error /opt/app/copy/node_modules/node-sass: Command failed.
Exit code: 135
Command: sh
Arguments: -c node scripts/build.js
Directory: /opt/app/copy/node_modules/node-sass
Output:
Binary found at /opt/app/copy/node_modules/node-sass/vendor/linux_musl-x64-48/binding.node
Testing binary
Bus error
< Error: Command failed: yarn install -s && yarn run build
at checkExecSyncError (child_process.js:483:13)
at execSync (child_process.js:523:13)
at buildProject (/opt/app/generate-target.js:99:9)
at /opt/app/node_modules/async/dist/async.js:3830:24
at replenish (/opt/app/node_modules/async/dist/async.js:946:17)
at iterateeCallback (/opt/app/node_modules/async/dist/async.js:931:17)
at /opt/app/node_modules/async/dist/async.js:906:16
at /opt/app/node_modules/async/dist/async.js:3835:13
at rsync.shell.flags.exclude.source.destination.execute.error (/opt/app/generate-target.js:81:17)
at Rsync. (/opt/app/node_modules/rsync/rsync.js:530:13)
error: null,
cmd: ‘yarn install -s && yarn run build’,
file: ‘/bin/sh’,
args: [ ‘/bin/sh’, ‘-c’, ‘yarn install -s && yarn run build’ ],
options:
< stdio: [ [Object], [Object], [Object] ],
encoding: ‘utf8’,
shell: true,
file: ‘/bin/sh’,
args: [ ‘/bin/sh’, ‘-c’, ‘yarn install -s && yarn run build’ ],
envPairs:
[ ‘PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin’,
‘HOSTNAME=5b8e812a6cfe’,
‘no_proxy=.local, 169.254/16′,
‘HOME=/root’ ] >,
envPairs:
[ ‘PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin’,
‘HOSTNAME=5b8e812a6cfe’,
‘no_proxy=
.local, 169.254/16′,
‘HOME=/root’ ],
stderr: null,
stdout: null,
pid: 15,
output: [ null, null, null ],
signal: null,
status: 1 >
✨ Done in 155.24s.

running in a docker alpine linux container

it’s a custom container we use to build our react projects.

it’s dying in this function (and it was working). We’re having some networking issues in my office, so I’ve got other moving parts I need to check:

I changed nothing, and now that our network issue was resolved, all my builds are green.

Источник

Issue with Ubuntu 16.04 GPU install: Bus error (core dumped) #7663

Operating System: Ubuntu 16.04

Installed version of CUDA and cuDNN: CUDA 8.0, cuDNN 5.1

$ ls -l /usr/local/cuda-8.0/lib64/libcud*
-rw-r—r— 1 root root 556000 Feb 19 15:48 /usr/local/cuda-8.0/lib64/libcudadevrt.a
lrwxrwxrwx 1 root root 16 Feb 19 15:48 /usr/local/cuda-8.0/lib64/libcudart.so -> libcudart.so.8.0
lrwxrwxrwx 1 root root 19 Feb 19 15:48 /usr/local/cuda-8.0/lib64/libcudart.so.8.0 -> libcudart.so.8.0.61
-rwxr-xr-x 1 root root 415432 Feb 19 15:48 /usr/local/cuda-8.0/lib64/libcudart.so.8.0.61
-rw-r—r— 1 root root 775162 Feb 19 15:48 /usr/local/cuda-8.0/lib64/libcudart_static.a
lrwxrwxrwx 1 root root 13 Feb 19 16:10 /usr/local/cuda-8.0/lib64/libcudnn.so -> libcudnn.so.5
lrwxrwxrwx 1 root root 18 Feb 19 16:10 /usr/local/cuda-8.0/lib64/libcudnn.so.5 -> libcudnn.so.5.1.10
-rwxr-xr-x 1 root root 42762752 Feb 19 16:10 /usr/local/cuda-8.0/lib64/libcudnn.so.5.1.10

Installed GPU enabled TensorFlow with:
pip install tensorflow-gpu

Error message importing tensorflow:
Python 3.6.0 |Anaconda custom (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type «help», «copyright», «credits» or «license» for more information.

import tensorflow
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
Bus error (core dumped)

Any idea why the above ‘Bus error’ is happening? Thanks a lot!

I also tried installing from source, but got this error when creating the pip package:
, after running bazel build —config opt —config=cuda //tensorflow/tools/pip_package:build_pip_package :
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-self-assign’
ERROR: /home/jiexun/tensorflow/tensorflow/python/BUILD:2279:1: Linking of rule ‘//tensorflow/python:_pywrap_tensorflow.so’ failed: link_dynamic_library.sh failed: error executing command external/bazel_tools/tools/cpp/link_dynamic_library.sh no ignored ignored ignored external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -shared -o . (remaining 27 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
bazel-out/local_linux-py3-opt/bin/_solib_local/_U@local_Uconfig_Ucuda_S_Scuda_Ccudnn___Uexternal_Slocal_Uconfig_Ucuda_Scuda_Slib/libcudnn.so.5: file not recognized: File truncated
collect2: error: ld returned 1 exit status
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use —verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1332.429s, Critical Path: 853.44s

The text was updated successfully, but these errors were encountered:

Источник

Program crash messages

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, or tell me)

Contents

Segfault, Bus Error, Abort, and such

  • segfault means the kernel says: there is something at that address, but your process may not access it
  • bus error means the kernel says: that address doesn’t even exist — anymore, or at all
  • (both are kernel responses to hardware signals from the memory controller)
  • pointer bugs can lead to either segfault or bus error

. note that specific bugs are biased to cause one or the other, due to the likeliness of hitting existing versus non-existing addresses (and various things can influence that likeliness, e.g. 32-bit address spaced usually being mostly or fully mapped, 64-bit not)

  • abort() means code itself says «okay, continuing running is a Bad Idea, let’s stop now»

usually based on a test that should never fail. if you look from a distance it’s much like an exit(). The largest practical differences: abort implies dumping core, so that you can debug this abort avoids calling exit handlers . and the earlier this happens, the more meaningful debugging of the dumped core is. Hence the explicit test and abort. a fairly common case is memory allocation (as signalled by something that actually checks; not doing so is often a segfault very soon after, particularly if dereferencing null)

Segfault

Segmentation refers to the fact that processes are segmented from each other.

A segmentation fault (segfault) signals that the requested memory location exists, but the process is not allowed to do what it is trying.

Which is often one of:

  • the address isn’t of the requesting processess’s currently mapped space, e.g.
    • a the null pointer dereference, because most OSes don’t map the very start of memory to any process (mostly for this special case)
    • buffer overflow when it gets to memory outside the mapped space
    • a stack overflow can cause it (though other errors may be more likely, because depending on setup it may trample all of the heap before it does)
  • attempt to write to read-only memory

A segfault is raised by hardware that supports memory protection (the MPU in most modern computers), which is caught by the kernel.

The kernel then decides what to do, which in linux amounts to sending a signal (SIGSEGV) to the originating process, where the default signal handler quits that program.

(core dumped) means it dumped process memory to a file for debugging purposes (the word core is historic, referring to magnetic core memory. It seems it stuck because this is a nicely specific term)

Bus error

Means the processor / memory subsystem cannot even attempt to access the memory it was asked to access.

Also sent by hardware, received by the kernel, and on linux handled by sending it SIGBUS, triggering the default signal handler.

Possible causes include:

  • address does not make sense, in that it cannot possibly be there (outside of mappable addresses)

e.g. a using random number as a pointer pointer has a decent chance of being this or a segfault

  • IO
    • device became unavailable (verify)
    • device has to reports something is unavailable, e.g. a RAID controller refusing access to a broken drive (e.g. search for combination with «rejecting I/O to offline device»)
  • memory mapped IO where the backing device is not currently available

. or ran out of space, e.g. when mmapping on a ram disk (verify)

  • address fails the platform’s alignment requirements

larger-than-byte units often have to be aligned to their size, e.g. 16-bit to the nearest 16-bit address Less likely on x86 style platforms than others (x86 is more lenient around misalignments than others) Theoretically rare anyway, as compilers tend to pad data that is not ideally aligned.

  • cannot page in the backing memory (verify)

e.g. a broken swap device? (verify) accessing a memory-mapped file that was removed (though in some cases the OS/filesystem may keep the storage around until it is not used, making this impossible) executing a binary image that was removed (similar note as above)

In comparison to a segfault:

  • similar in that it is about the address

and having a mangled or random-valued pointer value could lead to either

  • similar in that both are raised by the underlying hardware, that the OS sends the originating process a signal, and that the default (kernel-supplied) signal handler kills that originating process.
  • differs in that a segfault means the request is valid in a mechanical way, but the requesting process may not do this operation

Aborted (core dumped)

This message comes from the default signal handler (verify) for an incoming SIGABRT.

The reason for the handler is often to abort() and stop the process as soon as possible (without calling exit handlers (verify)), typically the process itself intentionally stopping/crashing as soon as possible, which is done for two good reasons:

  • the sooner you do, the more meaningful the core dump is to figuring out what went wrong
  • the sooner you do, the less likely you go on to nonsense things to data (and potentially write corrupted data to persistent storage)

Ideally, this is only seen during debugging, but the latter reason is why you’ld leave this in.

The likeliest sources are the process itself asking for this via a failed

On core dumps

A process core dump contains (most/all? (verify)) writeable segments specific to the process, which basically means the data segment and stack segment.

A core dump uses ELF format, though is seems to be a bit of a de facto thing wider than the ELF standard.

By default it does not contain the text segment, which contains the code, which is when debugging you also have to tell it what executable was being used.

It wouldn’t be executable even them, since it’s missing some details (entry point, CPU state).

Illegal instruction (core dumped)

Illegal instruction means the CPU got an instruction it did not support.

(the CPU signals this via what in the kernel becomes SIGILL — which has further uses[1])

It can happen when executable code becoming corrupted.

More commonly, though it comes from programs being compiled with very specific optimizations within the wider platform it is part of.

Most programs are compiled to avoid this ever happening, by being conservative about what it’s being run on, which is what compilers and code defaults to.

But when you e.g. compile for instructions that were recently introduced, and omit fallbacks (e.g. via intrinsics), and run it on an older CPU, you’ll get this.

For example, some recent tensorflow builds just assume your CPU has AVX instructions, which didn’t exist in any CPUs from before 2011[2] and still don’t in some lower-end x86 CPUs (Pentium, Celeron, Atom).

Источник

apt-get has broken for me. I tried to re-install it from a .deb, without any luck. I also tried installing aptitude from a .deb. The text below is what I see when running apt-get update. Before trying to install from .deb I saw the ‘Bus error’ message when running as normal user and sudo, instead of different errors. I’m hoping I can fix this without having to re-install Kubuntu, because the setup afterwards would be my whole day, but that’s my next step if no one here knows what to do. I’m running Kubuntu version 16.04.2.

prompt:~$ apt-get update
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
prompt:~$ sudo !!
sudo apt-get update
Bus error (core dumped)

asked Aug 31, 2017 at 15:54

thekthuser's user avatar

Bus error can also mean faulty hardware. Be sure to run memtest. Especially if reinstall doesn’t work. And if reinstall does work, check your filesystem and underlying device.

answered Aug 31, 2017 at 18:29

ptman's user avatar

ptmanptman

27.7k2 gold badges28 silver badges45 bronze badges

Just delete the two lock files. Use:

rm /var/lib/apt/lists/lock

and

rm /var/lib/dpkg/lock

Now run apt again and it will work.

Michael Hampton's user avatar

answered Aug 29, 2018 at 15:17

user485372's user avatar

1

  • Index
  • » Newbie Corner
  • » [(Un)solved] ldconfig on anything gives Bus error (core dumped)

Pages: 1

#1 2019-12-06 00:00:21

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

[(Un)solved] ldconfig on anything gives Bus error (core dumped)

I think I need to rebuild my /etc/ld.so.cache from scratch.
Can I do it with a blank /etc/ld.so.conf? Or should I use a minimal

# cat /etc/ld.so.conf
/usr/lib32

The output of any one line from

into

produces the same error. There are no trailing blanks in any line.

Alternatively, I could reinstall ldconfig. How do I use pacman to find out what package holds it? (I need this method for later….) I expect it is in the base group???

Last edited by OrigBitmancer (2020-03-09 20:02:57)

#2 2019-12-06 00:23:07

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [(Un)solved] ldconfig on anything gives Bus error (core dumped)


No, it didn’t «fix» anything. It just shifted the brokeness one space to the right. — jasonwryan
Closing — for deletion; Banning — for muppetry. — jasonwryan

aur — dotfiles

#3 2019-12-06 01:12:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,833
Website

Re: [(Un)solved] ldconfig on anything gives Bus error (core dumped)

Or just `pacman -Qo /bin/ldconfig` given that it’s already installed.


«UNIX is simple and coherent…» — Dennis Ritchie, «GNU’s Not UNIX» —  Richard Stallman

#4 2019-12-06 03:06:53

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

Re: [(Un)solved] ldconfig on anything gives Bus error (core dumped)

Thank you, Trilby and Slithery. I found ldconfig was a member of the glibc package.
My next step was to reinstall glibc. It had these results:

(1/1) reinstalling glibc          
Generating locales...
  en_US.UTF-8... done
  en_US.ISO-8859-1... done
Generation complete.
/tmp/alpm_9Msspz/.INSTALL: line 1: 37367 Bus error               (core dumped) ldconfig -r .
error: command failed to execute correctly
error: command terminated by signal 7: Bus error
:: Running post-transaction hooks...
(1/7) Reloading system manager configuration...
(2/7) Creating temporary files...
error: command failed to execute correctly
(3/7) Arming ConditionNeedsUpdate...
...

The alpm error looks interesting, but it may be a side effect.

I have 2 e-cents. May I buy another clue?

#5 2019-12-06 03:20:16

loqs
Member
Registered: 2014-03-06
Posts: 15,645

Re: [(Un)solved] ldconfig on anything gives Bus error (core dumped)

error: command terminated by signal 7: Bus error

What is the output of dmesg after you reinstalled glibc?
Particularly relating to the storage device.

Last edited by loqs (2019-12-06 03:20:28)

#6 2019-12-06 03:25:55

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

Re: [(Un)solved] ldconfig on anything gives Bus error (core dumped)

Yikes! Thanks, loqs! Looks like something is wrong with my main 2TB disk!

[86857.894556] ata5.00: exception Emask 0x0 SAct 0x3000000c SErr 0x0 action 0x0
[86857.894562] ata5.00: irq_stat 0x40000008
[86857.894566] ata5.00: failed command: READ FPDMA QUEUED
[86857.894573] ata5.00: cmd 60/08:18:90:9c:90/00:00:01:00:00/40 tag 3 ncq dma 4096 in
                                        res 41/40:00:90:9c:90/00:00:01:00:00/40 Emask 0x409 (media error) <F>
[86857.894575] ata5.00: status: { DRDY ERR }
[86857.894577] ata5.00: error: { UNC }
[86857.895126] ata5.00: SB600 AHCI: limiting to 255 sectors per cmd
[86857.895666] ata5.00: SB600 AHCI: limiting to 255 sectors per cmd
[86857.895669] ata5.00: configured for UDMA/133
[86857.895713] sd 4:0:0:0: [sdc] tag#3 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[86857.895717] sd 4:0:0:0: [sdc] tag#3 Sense Key : Medium Error [current] 
[86857.895720] sd 4:0:0:0: [sdc] tag#3 Add. Sense: Unrecovered read error - auto reallocate failed
[86857.895724] sd 4:0:0:0: [sdc] tag#3 CDB: Read(10) 28 00 01 90 9c 90 00 00 08 00
[86857.895728] blk_update_request: I/O error, dev sdc, sector 26254480 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[86857.895782] ata5: EH complete

Is this the drive or the controller?

#7 2019-12-06 08:09:52

seth
Member
Registered: 2012-09-03
Posts: 35,313

Re: [(Un)solved] ldconfig on anything gives Bus error (core dumped)

#8 2019-12-06 08:11:29

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

Re: [(Un)solved] ldconfig on anything gives Bus error (core dumped)

What am I looking for in the SMART results? I ran them several hours ago….

#9 2019-12-06 08:13:07

seth
Member
Registered: 2012-09-03
Posts: 35,313

Re: [(Un)solved] ldconfig on anything gives Bus error (core dumped)

The status matrix of «smartctl -a /dev/sdc» — it’s gonna report several values reg. crc errors, reallocations, pending sectors…

#10 2019-12-06 08:14:09

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

Re: [(Un)solved] ldconfig on anything gives Bus error (core dumped)

Ok. Will drop it in 12 hours or so.

#11 2020-03-09 20:00:19

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

Re: [(Un)solved] ldconfig on anything gives Bus error (core dumped)

I can no longer research this topic as I have had to rebuild the system twice since then. Thanks to all for help.

10 More Discussions You Might Find Interesting

1. Programming

C: Memory Fault (core dumped)

When I run programm show this message: Memory Fault (core dumped)

Does anyone can help me and tell me what is wrong? please

#include <stdlib.h>
#include <stdio.h>
#include <process.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>

int main(int argc, char *argv) { … (3 Replies)

Discussion started by: ebasse2

3. Filesystems, Disks and Memory

(core dumped) | gjar

hello,

when i make gcc 4.4.2 i get this message

find gnu java javax org sun -name .svn -prune -o -name ‘*.class’ -print |
gjar -cfM@ $here/libgcj-4.4.2.jar
/bin/sh: line 2: 32730 Done find gnu java javax org sun -name .svn -prune -o -name ‘*.class’… (2 Replies)

Discussion started by: aleppos

4. Shell Programming and Scripting

Unable to catch the output after core dump and bus error

I have a weird situation in which the binary dumps core and gives bus error. But before dumping the core and throwing the buss error, it gives some output.

unfortunately I can’t grep the output before core dump

db2bfd -b test.bnd
maxSect 15
Bus Error (core dumped)

But if I do … (4 Replies)

Discussion started by: rakeshou

5. UNIX for Dummies Questions & Answers

mysqldump bus error — cored dumped

hi,

I need to backup a database but I’m getting the error «bus error — core dumped» just after I run mysqldump command.

The server has installed solaris 9.

Any help would be appreciated (3 Replies)

Discussion started by: dahr

6. Programming

Memory Fault,Core dumped

I have written a code in UNIX which is complied by using g++. Compling with turbo C didnt yield any errors, but with g++ I am getting Memory fault, core dumped. Could anyone help me out with this?

Given below is the code:

#include<stdio.h>

#include<string.h>
#include<stdlib.h>… (2 Replies)

Discussion started by: usshell

7. UNIX for Advanced & Expert Users

Memory Fault — Core Dumped

I use SCO UNIX 5.07 on a Compaq Proliant Machine. Each time I press the Escape or Delete key while running a program or issuing a FoxBase+ command from the dot prompt, I receive the error message: «Memory Fault — Core Dumped» and the screen locks up immediately.

I would appreciate if necessary… (0 Replies)

Discussion started by: bayuz

8. Filesystems, Disks and Memory

Abort core dumped!!!!

HI All,

I am working on Solaris 8, i have this application runing on one of the partitions,(the installation was done here ie /export/home)

And the out put of this goes to another parition of other disk attached to the same machine. After a certain period of time is get this error stating… (2 Replies)

Discussion started by: zing

9. UNIX for Dummies Questions & Answers

core dumped

what is segmentation core dumped?
how should i respond? (9 Replies)

Discussion started by: yls177

10. UNIX for Dummies Questions & Answers

Segmentation fault (core dumped)

Hello To All!

Now anfd then I receive a message on my console:

Segmentation fault (core dumped)

What does it mean? Or more precisely what are the implications?

:confused: (1 Reply)

Discussion started by: Ivo

#
6 лет, 4 месяца назад

(отредактировано

6 лет, 4 месяца назад)

Темы:

1

Сообщения:

20

Участник с: 30 октября 2014

Всем доброе время суток! Проблема такого плана. В частном доме часто плохое напряжение, и поэтому ПК работает через стабилизатор. (УПС нет) и комп часто вырубался жестко из-за этого полетело, что то в системе !!! Некоторый софт не запускается …. Вот ошибка firefox

[Child 9482] WARNING: pipe error (3): Соединение разорвано другой стороной: file /build/firefox/src/firefox-49.0.1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 316
[Child 9482] ###!!! ABORT: Aborting on channel error.: file /build/firefox/src/firefox-49.0.1/ipc/glue/MessageChannel.cpp, line 2052
[Child 9482] ###!!! ABORT: Aborting on channel error.: file /build/firefox/src/firefox-49.0.1/ipc/glue/MessageChannel.cpp, line 2052
Ошибка шины (core dumped)
И много еще у каких прог токая ошибка подскажите в чем может быть проблема?! Систему не охото занова устанавливать:(

vasek

#
6 лет, 4 месяца назад

(отредактировано

6 лет, 4 месяца назад)

Темы:

47

Сообщения:

11417

Участник с: 17 февраля 2013

Информации практически нет, гадать нет смысла…
Ошибка шины (core dumped) — лучше погуглить по Bus error (core dumped), но вряд ли без уточнения проблемы что то можно толковое нагуглить …. а для сбора информации
1. Лучше сначала просмотреть внимательно логи — возможно есть какие то настораживающие записи перед падением …
2. Посмотри наличие коры…. $ coredumpctl list … (или в ручную — /var/lib/systemd/coredump/) — если есть в наличии, попробуй запустить в gdb …. хотя бы посмотреть, где падают ….
3. Можно попробовать потрейсить (strace) по системным вызовам …
4. Если это выскакивает у многих приложений, то это может быть связано и с аппаратными проблемами — неплохо проверить HDD и память

Ошибки не исчезают с опытом — они просто умнеют

vadik

#
6 лет, 4 месяца назад

(отредактировано

6 лет, 4 месяца назад)

Темы:

55

Сообщения:

5410

Участник с: 17 августа 2009

vasek, есть еще нулевой вариант — просто переустановить проблемные приложения.
Только это все до лампочки. Следующий скачек напряжения может отправить в небытие и материнку, и ЖД и пр. пр. пр.
Бороться в первую очередь нужно с причиной, а не с последствиями.

Aivar

#
6 лет, 4 месяца назад

Темы:

4

Сообщения:

6897

Участник с: 17 февраля 2011

tagerSU
комп часто вырубался жестко из-за этого полетело, что то в системе !!!

Жестко полетело в файловой системе. vadik, прав.

ErV

#
6 лет, 4 месяца назад

Темы:

18

Сообщения:

121

Участник с: 03 июня 2015

У меня была такая ерунда когда сбоила ОЗУ, причем это проявлялось редко и по разному, но подобные ошибки были как в firefox так и в chromium. Gold Memory Test в режиме Thorough на ночь помогут вам подтвердить или исключить этот пункт.

lampslave

#
6 лет, 4 месяца назад

Темы:

32

Сообщения:

4800

Участник с: 05 июля 2011

ErV
У меня была такая ерунда когда сбоила ОЗУ, причем это проявлялось редко и по разному, но подобные ошибки были как в firefox так и в chromium. Gold Memory Test в режиме Thorough на ночь помогут вам подтвердить или исключить этот пункт.

Точняк. Привезли мужика с топором в спине — а давайте ему температуру померим, может грипп у него?

Купите уже УПС, не гробьте технику.

vasek

#
6 лет, 4 месяца назад

Темы:

47

Сообщения:

11417

Участник с: 17 февраля 2013

lampslave, ты прав — топор нужно извлекать в первую очередь и, при необходимости, переводить в реанимцию, чтобы привести в чувство…… но рана то сама по себе никуда не исчезнет, все равно нужно лечить (после того как переведут в обычную палату) ……… если не лечить может образоваться и сепсис или что другое …….

Ошибки не исчезают с опытом — они просто умнеют

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Linux acpi error ae not found
  • Linux 139 error
  • Linter error running pycodestyle
  • Links do not have a discernible name как исправить
  • Links are not crawlable как исправить

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии