Os X Terminal Bus Error
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up What is a bus error? up vote 156 down vote favorite 49 What does the "bus error" message mean, and how does it differ from a segfault? c unix segmentation-fault bus-error share|improve this question edited Oct 18 '15 at 10:44 Cool Guy 15.7k51952 asked Oct 17 '08 at 14:48 raldi 7,272216178 add a comment| 15 Answers 15 active oldest votes up vote 152 down vote accepted Bus errors are rare nowadays on x86 and occur when your processor cannot even attempt the memory access requested, typically: using a processor instruction with an address that does not satisfy its alignment requirements. Segmentation faults occur when accessing memory which does not belong to your process, they are very common and are typically the result of: using a pointer to something that was deallocated. using an uninitialized hence bogus pointer. using a null pointer. overflowing a buffer. PS: To be more precise this is not manipulating the pointer itself that will cause issues, it's accessing the memory it points to (dereferencing). share|improve this answer edited Oct 17 '08 at 15:18 answered Oct 17 '08 at 15:12 bltxd 5,75322336 52 They aren't rare; I'm just at Exercise 9 from How to Learn C the Hard Way and already encountered one... –11684 Mar 26 '13 at 20:12 6 Another cause of bus errors (on Linux anyway) is when the operating system can't back a virtual page with physical memory (e.g. low-memory conditions or out of huge pages when using huge page memory.) Typically mmap (and malloc) just reserve the virtual address space, and the kernel assigns the physical memory on demand (so called soft page faults.) Make a large enough malloc, and then write to enough of it and you'll get a bus error. –Eloff Jul 14 '15 at 0:09 add a comment| up vote 58 down vote A segfault is accessing memory that you're not allowed to access. It's read-only, you don't have permission, etc... A bus error is trying to access memory that can't possibly be there. You've used an address th
enter a title. You can not post a blank message. Please type your message and try again. This discussion is locked lazyrussian Level 1 (0 points) Q: Terminal Error (SSH leads to Bus Error) Heya,Everytime I try to ssh on my client I get a Bus Error. When I Su, and try again, it asks me for RSA authenticatin. I say yes, and then it hangs trying to connect - I assume it's tryign to connect.The I get frustrated, I close the terminal, and I try again in su mode. It just hangs at that point.Anyone know how to fix this? Macbook (Intel Core Duo, Gen 1), Mac http://stackoverflow.com/questions/212466/what-is-a-bus-error OS X (10.5.3) Posted on Jun 6, 2008 7:41 AM I have this question too by glsmith,Solvedanswer glsmith Level 3 (875 points) A: Glad to help (you might want to mark this as Solved so that others know there's a solution) Posted on Jun 6, 2008 12:12 PM See the answer in context Close Q: Terminal Error (SSH leads to Bus Error) All replies Helpful answers by glsmith, glsmith Jun https://discussions.apple.com/thread/1548796?tstart=0 6, 2008 10:07 AM in response to lazyrussian Level 3 (875 points) Jun 6, 2008 10:07 AM in response to lazyrussian That error would lead me to think there's a bug in your ssh client. Is this the stock ssh client that comes with OS X, or have you installed a different one via something like Fink or MacPorts? You could run some debugging from ssh to see where things are hanging up. From your client, you could use the -v option which will give your some debugging information and may tell you who is hanging up. If that doesn't tell you anything, you can do some similar things on the remote side to the sshd daemon that is accepting your connection.However, I'm still concerned about the bus error. Can you paste your connection attempt here, showing that error? Helpful (0) Reply options Link to this post by lazyrussian, lazyrussian Jun 6, 2008 10:28 AM in response to glsmith Level 1 (0 points) Jun 6, 2008 10:28 AM in response to glsmith Heya,thanks for the reply. I'm using the Terminal.app client.Here's the output of my connection attempt:swire-d169:~ Arthur$ ssh -v jlab.orgBus errorswire-d169:~ Arthur$ suPassword:sh-3.2# ssh -v jlab.orgOpenSSH_4.7p1, OpenSSL 0.9.7l 28 Sep 2006debug1: Reading configuration data /etc/ssh_configdebug1: Connecting to jlab.org [129
a problem in which IDL 6.3 starts and runs from the Terminal.app command line, but when I invoke any graphics commands (PLOT, TV, etc.) IDL exits with a "bus error". Oddly, a HELP, !D, /STRUCT shows that X is the http://www.idlcoyote.com/tips/maccrash.html graphics device but HELP, /DEVICE results in the bus error problem. I can run IDL 6.3 just https://en.wikipedia.org/wiki/Bus_error fine from the X11 command line - but that command line is quite limited compared to Terminal. ANSWER: You can find a complete discussion of this problem in this May 18th, 2006 IDL newgroup thread. The bottom line is that you must set your DISPLAY environment variable in your Terminal window prior to launching IDL. Here is a short explanation of the problem from Karl Schultz: All X client programs, os x including IDL, need to know what X server to connect to. If you open a Terminal on OS X and type: xclock whether an X server is running on your OS X workstation or not, you'll get: Error: Can't open display: The proper approach is to start the X server, and if you intend to start X clients from the Terminal, you need to either set the DISPLAY environment variable to the server's connection address (e.g., :0, or myhost:0), or specify the connection address with a -display keyword os x terminal parameter (e.g., xclock -display myhost:0). It turns out that IDL 6.2 and prior somehow connected to the X server running on your OS X desktop without specifying the DISPLAY environment variable. At this exact second, I don't know how this was accomplished. While convenient, one can argue that the behavior is incorrect. IDL should politely fail to create the window and let the user correct the problem. (It is possible that IDL is simply using :0 in the absense of a DISPLAY environment setting and that's why it worked. But IDL's going out on a limb here and making an assumption that you may not want) OS X provides a rather unusual desktop environment, because the desktop is not controlled by the X server, even when X11 is running. In a more conventional X desktop, any xterm or other client started from a desktop menu inherits the DISPLAY environment variable setting from the server and so DISPLAY is set in the xterm environment. Any clients launched from that xterm will show up on that server. So, you can do it either way. You just need to be aware of the extra step involved in Terminal to set DISPLAY the way you want it. The problem was introduced as a side-effect of the new multi-monitor functionality and it happens even if there is only one monitor. I'll look into restoring the 6.2 behavior in the next release, but in the meantime, you really need to set that DISPLAY variable. It is the right thing to do from an X11 point of vi
challenged and removed. (July 2015) (Learn how and when to remove this template message) In computing, a bus error is a fault raised by hardware, notifying an operating system (OS) that a process is trying to access memory that the CPU cannot physically address: an invalid address for the address bus, hence the name. In modern use on most architectures these are much rarer than segmentation faults, which occur primarily due to memory access violations: problems in the logical address or permissions. On POSIX-compliant platforms, bus errors usually result in the SIGBUS signal being sent to the process that caused the error. SIGBUS can also be caused by any general device fault that the computer detects, though a bus error rarely means that the computer hardware is physically broken—it is normally caused by a bug in a program's source code.[citation needed] Bus errors may also be raised for certain other paging errors; see below. Contents 1 Causes 1.1 Non-existent address 1.2 Unaligned access 1.3 Paging errors 2 Example 3 References Causes[edit] There are at least three main causes of bus errors: Non-existent address[edit] Software instructs the CPU to read or write a specific physical memory address. Accordingly, the CPU sets this physical address on its address bus and requests all other hardware connected to the CPU to respond with the results, if they answer for this specific address. If no other hardware responds, the CPU raises an exception, stating that the requested physical address is unrecognized by the whole computer system. Note that this only covers physical memory addresses. Trying to access an undefined virtual memory address is generally considered to be a segmentation fault rather than a bus error, though if the MMU is separate, the processor can't tell the difference. Unaligned access[edit] Most CPUs are byte-addressable, where each unique memory address refers to an 8-bit byte. Most CPUs can access individual bytes from each memory address, but they generally cannot acce