Sponsored Content
Top Forums Programming When a process is down - how to get a coredump in arm board? Post 302400655 by aobai on Wednesday 3rd of March 2010 09:12:37 PM
Old 03-03-2010
Quote:
Originally Posted by jim mcnamara
Possible answers

The user running the app has a ulimit setting to prevent it - environment setting
You linked against an object that blocks SIGSEGV/SIGBUS
You block SIGSEGV/SIGBUS in your code somewhere

I do not know much about ARM. When you execute the image file is there some separate environment in which it runs? To check resource settings:
ex:
Code:
struct rlimit rlp;
if(getrlimit(RLIMIT_CORE, rlp)==0)
    fprintf(stdout, "core dump blocked\n");

I would guess this is the first place to look, and if this is not the case then it pretty much has to be signal blocking somewhere.
Quote:
The user running the app has a ulimit setting to prevent it - environment setting
I use " ulimit -c unlimited ", not" ulimit -c 100 "or something else .

Quote:
You block SIGSEGV/SIGBUS in your code somewhere
I can use functions setjmp, longjmp ,and signal to catch SIGSEGV/SIGBUS and do anything i want .
Even so , I don't know the place generate SIGSEGV/SIGBUS
Code:
struct rlimit rlp;
if(getrlimit(RLIMIT_CORE, rlp)==0)
    fprintf(stdout, "core dump blocked\n");

I use ulimit -a to display the setting , It's right !

/proc/sys/fs $ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 2040
coredump(blocks) unlimited
memory(kbytes) unlimited
locked memory(kbytes) 32
process 768
nofiles 1024
vmemory(kbytes) unlimited
locks unlimited
/proc/sys/fs $

Last edited by aobai; 03-03-2010 at 10:31 PM..
 

9 More Discussions You Might Find Interesting

1. Linux

Kernel internals for ARM

Hi, Does anybody have a good pointer on Linux kernel internals for ARM architecture? I can locate plenty for x86 but since ARM is RISC I think there would be subtle changes. So if somebody has a knowledge of good document on Linux Kernel internals for ARM or even a comparative study of kernel on... (0 Replies)
Discussion started by: Rakesh Ranjan
0 Replies

2. UNIX for Advanced & Expert Users

gcc arm compiler

I want to find the ARM assembly language for my sample C code using gcc .I had gcc compiler ,whether it is enough for it or i need to download gcc arm cross compiler.If necessary ,how it configured?I am using fedora (0 Replies)
Discussion started by: sujith4u87
0 Replies

3. Fedora

gcc arm compiler

think only compile is required I wish to compile a sample code int main() { int a=5,b=8,c; c=a+b; } compile using gcc -Wall -g -march=arm922t main.c -o hello I got an error :bad value(arm922t) for -march=switch instead of using march i used mcpu options ,the same... (1 Reply)
Discussion started by: sujith4u87
1 Replies

4. Programming

gcc for arm process

hi, correct me if am wrong, as per gcc doc gcc is able to compile code for different target systems such as ARM, ARC etc. I tried for compiling ARM but failed to do so. getting below error: gcc -mcpu=arm920t -c avg.c -o agv_arm `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.... (6 Replies)
Discussion started by: zing_foru
6 Replies

5. UNIX for Advanced & Expert Users

Trace "free(): invalid next size (normal)" error on arm-linux board

Hi guys, i'm running a program on samsumg 6410 arm cpu board. it caused an "free(): invalid next size (normal)" fail. i try to use gdb for remote debugging: 1, start gdb server on board: gdbserver 192.168.1.20:1234 ./HostAP Process ./HostAP created; pid = 499 Listening on port... (8 Replies)
Discussion started by: ss1969
8 Replies

6. UNIX for Dummies Questions & Answers

setserial not working on linux running on Beagleboard (ARM development board)

Hi, I'm trying to develop an application to work with serial infra-red module, but I'm having difficulties to even get my module started. My HW is Beagleboard, which has 1 UART serial port, normally used for console, which I have disabled (I re-created the boot.scr, without the console... (0 Replies)
Discussion started by: julumme
0 Replies

7. Programming

Running c code in ARM QEMU

I created and Compiled a C program to run in QEMU for ARM. When I run the program using the command #qemu-arm -L /home/arm-2010.09/arm-none-linux-gnueabi/libc ./test it gives me the following error: If 'qemu-arm' is not a typo you can use command-not-found to lookup the package that contains... (0 Replies)
Discussion started by: rupeshkp728
0 Replies

8. Hardware

Xenomai On ARM board EXYNOS 4210 ODROID-PC

Hi I am trying to port xenomai on exynos 4210 arm board. With some research I have found a way to port the board on the exynos board but the problem is that on the exynos-4210 website they have provided a patched version of linux-3.0.15 kernel for implementing on the board. On this kernel I am... (1 Reply)
Discussion started by: mohitjandwani
1 Replies

9. Programming

IDE's for the ARM processor on Linux

Hello everyone. I am running Debian on an ARM7 Device (aka my android phone). Everything is great. Works well. I would love to use it for Development. Mainly my interests are in Web Development, and Java development. So far the only useful IDE for debian arm is Netbeans. Which is pretty... (0 Replies)
Discussion started by: CDevelop
0 Replies
limit(1)                                                                                                                                  limit(1)

NAME
limit, ulimit, unlimit - set or get limitations on the system resources available to the current shell and its descendents SYNOPSIS
/usr/bin/ulimit [-f] [blocks] sh ulimit [ - [HS] [ a | cdfnstv]] ulimit [ - [HS] [ c | d | f | n | s | t | v]] limit csh limit [-h] [ resource [limit]] unlimit [-h] [resource] ksh ulimit [-HSacdfnstv] [limit] /usr/bin/ulimit The ulimit utility sets or reports the file-size writing limit imposed on files written by the shell and its child processes (files of any size may be read). Only a process with appropriate privileges can increase the limit. sh The Bourne shell built-in function, ulimit, prints or sets hard or soft resource limits. These limits are described in getrlimit(2). If limit is not present, ulimit prints the specified limits. Any number of limits may be printed at one time. The -a option prints all lim- its. If limit is present, ulimit sets the specified limit to limit. The string unlimited requests the largest valid limit. Limits may be set for only one resource at a time. Any user may set a soft limit to any value below the hard limit. Any user may lower a hard limit. Only a super-user may raise a hard limit. See su(1M). The -H option specifies a hard limit. The -S option specifies a soft limit. If neither option is specified, ulimit will set both limits and print the soft limit. The following options specify the resource whose limits are to be printed or set. If no option is specified, the file size limit is printed or set. -c maximum core file size (in 512-byte blocks) -d maximum size of data segment or heap (in kbytes) -f maximum file size (in 512-byte blocks) -n maximum file descriptor plus 1 -s maximum size of stack segment (in kbytes) -t maximum CPU time (in seconds) -v maximum size of virtual memory (in kbytes) csh The C-shell built-in function, limit, limits the consumption by the current process or any process it spawns, each not to exceed limit on the specified resource. If limit is omitted, print the current limit; if resource is omitted, display all limits. -h Use hard limits instead of the current limits. Hard limits impose a ceiling on the values of the current limits. Only the privi- leged user may raise the hard limits. resource is one of: cputime Maximum CPU seconds per process. filesize Largest single file allowed. Limited to the size of the filesystem (see df(1M)). datasize The maximum size of a process's heap in kilobytes. stacksize Maximum stack size for the process. The default stack size is 2**64. coredumpsize Maximum size of a core dump (file). This is limited to the size of the filesystem. descriptors Maximum number of file descriptors. Run the sysdef(1M) command to obtain the maximum possible limits for your system. The values reported are in hexadecimal, but can be translated into decimal numbers using the bc(1) command. memorysize Maximum size of virtual memory. limit is a number, with an optional scaling factor, as follows: nh Hours (for cputime). nk n kilobytes. This is the default for all but cputime. nm n megabytes or minutes (for cputime). mm:ss Minutes and seconds (for cputime). unlimit removes a limitation on resource. If no resource is specified, then all resource limitations are removed. See the description of the limit command for the list of resource names. -h Remove corresponding hard limits. Only the privileged user may do this. ksh The Korn shell built-in function, ulimit, sets or displays a resource limit. The available resources limits are listed below. Many systems do not contain one or more of these limits. The limit for a specified resource is set when limit is specified. The value of limit can be a number in the unit specified below with each resource, or the value unlimited. The -H and -S flags specify whether the hard limit or the soft limit for the given resource is set. A hard limit cannot be increased once it is set. A soft limit can be increased up to the value of the hard limit. If neither the -H or -S options is specified, the limit applies to both. The current resource limit is printed when limit is omitted. In this case, the soft limit is printed unless -H is specified. When more than one resource is specified, then the limit name and unit is printed before the value. -a Lists all of the current resource limits. -c The number of 512-byte blocks on the size of core dumps. -d The number of K-bytes on the size of the data area. -f The number of 512-byte blocks on files written by child processes (files of any size may be read). -n The number of file descriptors plus 1. -s The number of K-bytes on the size of the stack area. -t The number of seconds (CPU time) to be used by each process. -v The number of K-bytes for virtual memory. If no option is given, -f is assumed. Per-Shell Memory Parameters The heapsize, datasize, and stacksize parameters are not system tunables. The only controls for these are hard limits, set in a shell startup file, or system-wide soft limits, which, for the current version of the Solaris OS, is 2**64bytes. The following option is supported by ulimit: -f Sets (or reports, if no blocks operand is present), the file size limit in blocks. The -f option is also the default case. The following operand is supported by ulimit: blocks The number of 512-byte blocks to use as the new file size limit. /usr/bin/ulimit Example 1: Limiting the Stack Size The following example limits the stack size to 512 kilobytes: example% ulimit -s 512 example% ulimit -a time(seconds) unlimited file(blocks) 100 data(kbytes) 523256 stack(kbytes) 512 coredump(blocks) 200 nofiles(descriptors) 64 memory(kbytes) unlimited sh/ksh Example 2: Limiting the Number of File Descriptors The following command limits the number of file descriptors to 12: example$ ulimit -n 12 example$ ulimit -a time(seconds) unlimited file(blocks) 41943 data(kbytes) 523256 stack(kbytes) 8192 coredump(blocks) 200 nofiles(descriptors) 12 vmemory(kbytes) unlimited csh Example 3: Limiting the Core Dump File Size The following command limits the size of a core dump file size to 0 kilobytes: example% limit coredumpsize 0 example% limit cputime unlimited filesize unlimited datasize 523256 kbytes stacksize 8192 kbytes coredumpsize 0 kbytes descriptors 64 memorysize unlimited Example 4: Removing the limitation for core file size The following command removes the above limitation for the core file size: example% unlimit coredumpsize example% limit cputime unlimited filesize unlimited datasize 523256 kbytes stacksize 8192 kbytes coredumpsize unlimited descriptors 64 memorysize unlimited See environ(5) for descriptions of the following environment variables that affect the execution of ulimit: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. The following exit values are returned by ulimit: 0 Successful completion. >0 A request for a higher limit was rejected or an error occurred. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ bc(1), csh(1), ksh(1), sh(1), df(1M), su(1M), swap(1M), sysdef(1M), getrlimit(2), attributes(5), environ(5), standards(5) 19 Aug 2005 limit(1)
All times are GMT -4. The time now is 07:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy