Sponsored Content
Full Discussion: Illegal Instruction error
Operating Systems Solaris Illegal Instruction error Post 302902710 by achenle on Wednesday 21st of May 2014 10:23:45 PM
Old 05-21-2014
He's not getting SIGILL, he's getting SIGSEGV, at the address 0x201138F4. Given the brk() values posted right before that SIGSEGV, that looks like someone's overrunning his heap - by exactly 512 MB.

A couple of other issues, too:

1. Use of MAP_NORESERVE in mmap() calls.
Why? So if your process does get swapped out, you crash when swapped back in? If you're lucky, because else you run with corrupt data. Or your process crashes when swap space runs out....

2. open("", O_RDWR|O_CREAT) Err #2 ENOENT
Is this error properly handled? It looks like open() is being passed an empty string.

3. mmap() of the calling binary (./tcpserver).
What in the world is this thing doing, mmap()'ing itself read/write for the first 1080 bytes of the binary executable? I wouldn't doubt getting a SIGILL after *that*.

Last edited by achenle; 05-21-2014 at 11:35 PM..
 

10 More Discussions You Might Find Interesting

1. Programming

What is an "Illegal Instruction -Core Dumped"

Hai! i am working on Digital UNIX V3.2c Work station, my program uses Pro*C, C and X-Motif calls. i am facing problem while running application saying "Illegal Instruction Core Dumped". debugger dbx shows error at a line which shows "noname". when commenting large portion of the code it runs... (1 Reply)
Discussion started by: samn
1 Replies

2. UNIX for Dummies Questions & Answers

2489 Illegal instruction

Hello I am trying to execute a back up from one queue manager from one script saveqmgr.sh but I am getting 2489 Illegal instruction on line 16 $ sh +x ./saveqmgr.sh S1SEAGULL QueueManager=S1SEAGULL Retention= S1SEAGULL.MQS.14Jan2005 not found ./saveqmgr.sh: 2836 Illegal... (1 Reply)
Discussion started by: ana
1 Replies

3. Shell Programming and Scripting

Illegal instruction(coredump)

Hi I am trying to execute a simple grep command looking for records in a filename that start with 01 (grep ^01 filename) and am getting the error Illegal instruction(coredump). Has anyone any idea why this happens? Is it due to the file being corrupted? Thanks (1 Reply)
Discussion started by: colinmas
1 Replies

4. UNIX for Advanced & Expert Users

Case Instruction

Hi, this is my script to make a choice between 4 : clear echo " choose a profile and enter a number" echo echo " 1- oraSTT " echo echo " 2- appSTT " echo... (3 Replies)
Discussion started by: big123456
3 Replies

5. Solaris

what is that 1 in the instruction!~ (please help fast)

Hi all, make_lofs /.cdrom/<something>/<something> 1 what does this instruction mean? Note:both the "something" are obviously different . I would like to know what that 1 means, the rest of the instruction is clear!! Thanks (6 Replies)
Discussion started by: wrapster
6 Replies

6. UNIX for Dummies Questions & Answers

What's the difference between Segmentation fault and Bus error and Illegal...?

What's the difference between Segmentation fault and Bus error and Illegal instruction? Sometimes I got the one, and sometimes i got another, what are their differences? Segmentation fault (core dump)? Bus error (core dump)? Illegal instruction (core dump) Thanks Daniel (2 Replies)
Discussion started by: lakeat
2 Replies

7. UNIX for Dummies Questions & Answers

Error: "logger: illegal option -- p"

Hi All, I am working on a Solaris 10 server. From this month start, it gives the error "logger: illegal option -- p" with each command. If I execute a script whose output shown on terminal, it comes many times.. Could you please help? It comes only for my login. And I dont remember any changes... (4 Replies)
Discussion started by: jaiseaugustine
4 Replies

8. Shell Programming and Scripting

Open_ssh installation instruction ?

Hi , Currently the machine (solaris 10 ) is running with Sun_ssh. I would like to move to Open_ssh. I went through google. Each link shows different directions/ways to install openssh. I am not sure which one to follow . Installing OpenSSH Packages - SPARC and Intel x86/Solaris 9 and... (1 Reply)
Discussion started by: frintocf
1 Replies

9. UNIX for Advanced & Expert Users

Illegal character in prototype Perl error in AIX server

HI All , I am using AIX version 6 . having issue with below perl code, sub Article ($procudure, @params) { my ($procudure, @params) = @_; #Get handle TO Dataware House DATABASE try { my $dbHandle = &Cobol::DBAccess::getDBDwConnection(); ,,,,,,,,,,,,, ,,,,,,,,,,,,... (3 Replies)
Discussion started by: Perlbaby
3 Replies

10. Shell Programming and Scripting

Cp –r instruction

Pleas I want answer to this question? Pleas help me A system administrator suspects that there is an attack on his machine; he needs to make a backup of the files to check when they have been modified. For this purpose he uses the "cp -r" instruction to copy the root directory. What is the... (1 Reply)
Discussion started by: tamer11007
1 Replies
SHM_OPEN(3)						     Linux Programmer's Manual						       SHM_OPEN(3)

NAME
shm_open, shm_unlink - create/open or unlink POSIX shared memory objects SYNOPSIS
#include <sys/mman.h> #include <sys/stat.h> /* For mode constants */ #include <fcntl.h> /* For O_* constants */ int shm_open(const char *name, int oflag, mode_t mode); int shm_unlink(const char *name); Link with -lrt. DESCRIPTION
shm_open() creates and opens a new, or opens an existing, POSIX shared memory object. A POSIX shared memory object is in effect a handle which can be used by unrelated processes to mmap(2) the same region of shared memory. The shm_unlink() function performs the converse operation, removing an object previously created by shm_open(). The operation of shm_open() is analogous to that of open(2). name specifies the shared memory object to be created or opened. For porta- ble use, a shared memory object should be identified by a name of the form /somename; that is, a null-terminated string of up to NAME_MAX (i.e., 255) characters consisting of an initial slash, followed by one or more characters, none of which are slashes. oflag is a bit mask created by ORing together exactly one of O_RDONLY or O_RDWR and any of the other flags listed here: O_RDONLY Open the object for read access. A shared memory object opened in this way can be mmap(2)ed only for read (PROT_READ) access. O_RDWR Open the object for read-write access. O_CREAT Create the shared memory object if it does not exist. The user and group ownership of the object are taken from the correspond- ing effective IDs of the calling process, and the object's permission bits are set according to the low-order 9 bits of mode, except that those bits set in the process file mode creation mask (see umask(2)) are cleared for the new object. A set of macro constants which can be used to define mode is listed in open(2). (Symbolic definitions of these constants can be obtained by including <sys/stat.h>.) A new shared memory object initially has zero length--the size of the object can be set using ftruncate(2). The newly allocated bytes of a shared memory object are automatically initialized to 0. O_EXCL If O_CREAT was also specified, and a shared memory object with the given name already exists, return an error. The check for the existence of the object, and its creation if it does not exist, are performed atomically. O_TRUNC If the shared memory object already exists, truncate it to zero bytes. Definitions of these flag values can be obtained by including <fcntl.h>. On successful completion shm_open() returns a new file descriptor referring to the shared memory object. This file descriptor is guaran- teed to be the lowest-numbered file descriptor not previously opened within the process. The FD_CLOEXEC flag (see fcntl(2)) is set for the file descriptor. The file descriptor is normally used in subsequent calls to ftruncate(2) (for a newly created object) and mmap(2). After a call to mmap(2) the file descriptor may be closed without affecting the memory mapping. The operation of shm_unlink() is analogous to unlink(2): it removes a shared memory object name, and, once all processes have unmapped the object, de-allocates and destroys the contents of the associated memory region. After a successful shm_unlink(), attempts to shm_open() an object with the same name will fail (unless O_CREAT was specified, in which case a new, distinct object is created). RETURN VALUE
On success, shm_open() returns a nonnegative file descriptor. On failure, shm_open() returns -1. shm_unlink() returns 0 on success, or -1 on error. ERRORS
On failure, errno is set to indicate the cause of the error. Values which may appear in errno include the following: EACCES Permission to shm_unlink() the shared memory object was denied. EACCES Permission was denied to shm_open() name in the specified mode, or O_TRUNC was specified and the caller does not have write permis- sion on the object. EEXIST Both O_CREAT and O_EXCL were specified to shm_open() and the shared memory object specified by name already exists. EINVAL The name argument to shm_open() was invalid. EMFILE The process already has the maximum number of files open. ENAMETOOLONG The length of name exceeds PATH_MAX. ENFILE The limit on the total number of files open on the system has been reached. ENOENT An attempt was made to shm_open() a name that did not exist, and O_CREAT was not specified. ENOENT An attempt was to made to shm_unlink() a name that does not exist. VERSIONS
These functions are provided in glibc 2.2 and later. CONFORMING TO
POSIX.1-2001. POSIX.1-2001 says that the group ownership of a newly created shared memory object is set to either the calling process's effective group ID or "a system default group ID". NOTES
POSIX leaves the behavior of the combination of O_RDONLY and O_TRUNC unspecified. On Linux, this will successfully truncate an existing shared memory object--this may not be so on other UNIX systems. The POSIX shared memory object implementation on Linux 2.4 makes use of a dedicated file system, which is normally mounted under /dev/shm. SEE ALSO
close(2), fchmod(2), fchown(2), fcntl(2), fstat(2), ftruncate(2), mmap(2), open(2), umask(2), shm_overview(7) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2009-02-25 SHM_OPEN(3)
All times are GMT -4. The time now is 02:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy