Oracle Bus Error Solaris
Contents |
has received a signal indicating that it attempted to bus error core dumped solaris perform I/O to a device that is restricted or that does not exist.
Bus Error (core Dumped) C++
This message is usually accompanied by a core dump, except on read-only file systems. Action Use a debugger to examine the core file and determine what program bus error core dumped solaris 10 fault or system problem led to the bus error. If possible, check the program's output files for data corruption that might have occurred before the bus error. Technical Notes Bus errors can result from either a programming error or device corruption on your system. Some common causes of bus errors are: invalid file descriptors, unreasonable I/O requests, bad memory allocation, misaligned data structures, compiler bugs, and corrupt boot blocks. Previous: Broken pipeNext: "C" © 2010, Oracle Corporation and/or its affiliates
I'm not pointing my finger at gcc here, this is a Sun gotcha).Here's an example program (simplified for something much more complex that I was debugging), that illustrates how memory
How To Fix Bus Error (core Dumped)
alignment on SPARC systems can bite you if you are doing low-level things
Bus Error Core Dumped Sparc
in C. In the example the program allocates space for a thing structure which will be prepended with a header. The bus error core dumped redhat header structure has a dummy byte array called data which will be used to reference the start of the thing.struct thing { int an_int;};struct header { short id; char data[0];};struct header * maker( https://docs.oracle.com/cd/E19455-01/806-1075/msgs-1097/index.html int size ) { return (struct header *)malloc( sizeof( struct header ) + size );}int main( void ) { struct header * a_headered_thing = maker( sizeof( struct thing ) ); struct thing * a_thing = (struct thing *)&(a_headered_thing->data[0]); a_thing->an_int = 42;}If you build this on a SPARC machine you'll get the following error when you run it:Bus Error (core dumped)Annoyingly, if you build a debugging version of this http://blog.jgc.org/2007/04/debugging-solaris-bus-error-caused-by.html program the problem magically goes away and doesn't dump core in the debugger. So you either resort to printf-style debugging or going into gdb and looking at the assembly output.Here's what happens when you run this in gdb (non-debug code):(gdb) runProgram received signal SIGSEGV, Segmentation fault.0x000106d8 in main ()Since you can't get back to the source we're forced to do a little disassembly:(gdb) disassembleDump of assembler code for function main:0x000106b0
& Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers Search Forums Show Threads Show Posts Tag http://www.unix.com/unix-for-dummies-questions-and-answers/12838-bus-error-solaris.html Search Advanced Search Unanswered Threads Find All Thanked Posts Go to Page... learn linux https://dev.icinga.org/issues/702 and unix commands - unix shell scripting bus error on solaris UNIX for Dummies Questions & Answers Thread Tools Search this Thread Display Modes #1 01-29-2004 hcclnoodles Registered User Join Date: Mar 2002 Last Activity: 20 January 2016, 4:16 AM EST Posts: 303 Thanks: 1 Thanked 1 Time in 1 Post bus error on solaris bus error Hi there I am running soalris 9 on a sun fire 480r and all of a sudden (today) whenever the users run the command `top` we get the following message `bus error` does anybody have any information on what this is all about and whether there is a routine i can perform to gather more information on this any help on this would greatly appreciated Remove advertisements Sponsored Links hcclnoodles View Public Profile Find all posts by bus error (core hcclnoodles #2 01-29-2004 jsilva Registered User Join Date: Apr 2003 Last Activity: 28 July 2010, 3:08 PM EDT Posts: 169 Thanks: 0 Thanked 2 Times in 1 Post Hi, There're many reasons for a "bus error". It may be because the program ( top ) is trying to do some I/O operation to a device that has no permissions or does not exist... confirm that that only happens with top... is there any core dump ? It can be caused by bad programming too... or some OS issue... Remove advertisements Sponsored Links jsilva View Public Profile Visit jsilva's homepage! Find all posts by jsilva #3 01-29-2004 rhfrommn Registered User Join Date: Nov 2003 Last Activity: 25 January 2012, 5:08 PM EST Location: Minnesota Posts: 447 Thanks: 0 Thanked 3 Times in 3 Posts Unfortunately this is often caused by failed hardware, either a dead disk or a mainboard problem with the bus to the disk. Try doing other commands that will access each of your disks like du, ls, cd, etc. and see if you can pin down a pattern. If it truly is just the top command doing it a corrupted program or version conflict is possible, but if you get many different commands all failing when trying to access the same disk it is probably hardware. rhfrommn View
New issues w/o target version open issues grouped by status Bug #702 Solaris 10: Bus Error (core dumped) when starting icinga Added by antonxx about 6 years ago. Updated about 6 years ago. Status:ResolvedStart date:08/11/2010Priority:HighDue date:Assignee:dnsmichi% Done:100%Category:OtherTarget version:1.2 (Stable) Icinga Version: OS Version: Description Hi, I did now the same steps on solaris which I did when compiling on linux. My actual status: icinga with classical web interface works on suse linux 11.1 64 bit. On solaris 10 (sparc) I stumble over the step inthe quickstart documentation: --------------------------------------- #> /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg Icinga 1.0.2 Copyright (c) 2009-2010 Icinga Development Team (http://www.icinga.org) Copyright (c) 2009 Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 06-30-2010 License: GPL Bus Error (core dumped) #> --------------------------------------- When looking at the dump, I see: -------------------------------------- #> pstack /var/core/core_utuw57_icinga_0_0_1281357332_10848 core '/var/core/core_utuw57_icinga_0_0_1281357332_10848' of 10848: /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg ff056e5c _morecore (2011, b2648, b4438, ff1392ac, 7ffffc00, 0) + 178 ff05662c _malloc_unlocked (600, b2648, 1, b2648, ff1303a8, 0) + 1fc ff05635c _smalloc (10, 0, da08c, ff056538, ffffffff, ff139214) + 4c ff056414 malloc (9, 1, d9fd8, 0, ff1303a8, ff13a518) + 4c ff0693dc strdup (8b6e0, 0, 0, 0, 0, 99) + c 0003f5e8 init_macrox_names (b01d4, 0, 0, 0, 0, 0) + 28 0003ff80 init_macros (ffffffff, 3c, 1e, 1, aec00, ae800) + 4 0004ba8c reset_variables (b1050, 0, e, ff13a050, 1, 1) + 460 0001ef90 main (aec00, ffbffb9c, ffbffbac, b01c8, ff350100, 0) + a98 0001e390 _start (0, 0, 0, 0, 0, 0) + 5c ------------------------------------------- Note: I just compiled nagion 3.2.1 + the nagios plugins 1.4.15 (the same used with icinga) and the system works on solaris ... so it must be a difference since the fork... Related issues Duplicated by Core, Classic UI, IDOUtils - Bug #572: Segmentation Fault (core dumped) on solaris 10 (x86) whil... Closed 07/05/2010 Related to Duplicates Duplicated by Blocks Blocked by Precedes Follows Copied to Copied from Issue # Delay: days Cancel Associated revisions Revision 69d5fab5 Added by dnsmichi about 6 years ago disable eventprofiler on Solaris gcc3, pr