What is solution for this error?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting What is solution for this error?
# 1  
Old 04-26-2013
What is solution for this error?

Hi all, I am trying to run one model which contains many functions, If I use file below 1MB it works fine but If I use more than 1 MB getting following error

Please give me some solution

OS : Ubuntu 32-bit 12.04 LTS

Code:
*** glibc detected *** awk: double free or corruption (out): 0x08ac8768 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x73e42)[0xb7645e42]
awk[0x8052168]
awk[0x804dcfc]
awk[0x804dff7]
awk[0x8049076]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xb75eb4d3]
awk[0x804909d]
======= Memory map: ========
08048000-08061000 r-xp 00000000 08:09 3146401    /usr/bin/mawk
08061000-08062000 r--p 00018000 08:09 3146401    /usr/bin/mawk
08062000-08063000 rw-p 00019000 08:09 3146401    /usr/bin/mawk
08063000-08066000 rw-p 00000000 00:00 0 
08ac6000-1075c000 rw-p 00000000 00:00 0          [heap]
b72ea000-b73eb000 rw-p 00000000 00:00 0 
b746c000-b74ed000 rw-p 00000000 00:00 0 
b74ed000-b756e000 rw-p 00000000 00:00 0 
b759d000-b75b9000 r-xp 00000000 08:09 1835956    /lib/i386-linux-gnu/libgcc_s.so.1
b75b9000-b75ba000 r--p 0001b000 08:09 1835956    /lib/i386-linux-gnu/libgcc_s.so.1
b75ba000-b75bb000 rw-p 0001c000 08:09 1835956    /lib/i386-linux-gnu/libgcc_s.so.1
b75d0000-b75d2000 rw-p 00000000 00:00 0 
b75d2000-b7771000 r-xp 00000000 08:09 1835935    /lib/i386-linux-gnu/libc-2.15.so
b7771000-b7773000 r--p 0019f000 08:09 1835935    /lib/i386-linux-gnu/libc-2.15.so
b7773000-b7774000 rw-p 001a1000 08:09 1835935    /lib/i386-linux-gnu/libc-2.15.so
b7774000-b7777000 rw-p 00000000 00:00 0 
b7777000-b77a1000 r-xp 00000000 08:09 1835967    /lib/i386-linux-gnu/libm-2.15.so
b77a1000-b77a2000 r--p 00029000 08:09 1835967    /lib/i386-linux-gnu/libm-2.15.so
b77a2000-b77a3000 rw-p 0002a000 08:09 1835967    /lib/i386-linux-gnu/libm-2.15.so
b77b6000-b77ba000 rw-p 00000000 00:00 0 
b77ba000-b77bb000 r-xp 00000000 00:00 0          [vdso]
b77bb000-b77db000 r-xp 00000000 08:09 1835915    /lib/i386-linux-gnu/ld-2.15.so
b77db000-b77dc000 r--p 0001f000 08:09 1835915    /lib/i386-linux-gnu/ld-2.15.so
b77dc000-b77dd000 rw-p 00020000 08:09 1835915    /lib/i386-linux-gnu/ld-2.15.so
bf806000-bf828000 rw-p 00000000 00:00 0          [stack]
25    2    1    15    72    0    17-May-1979    12:00:00    AM    29.2    7    fin.sh: line 10: 12771: Abort(coredump)
Aborted (core dumped)

# 2  
Old 04-26-2013
It's crashing, is what it's doing. It seems to be doing so inside mawk. Difficult to say why exactly. This is not a normal condition -- this is a program bug of some sort inside mawk itself, not a bug in your script.

Perhaps ordinary awk can be used instead?
# 3  
Old 04-26-2013
Can you post fin.sh and also the output of "file core" on the core dump you get...
# 4  
Old 04-26-2013
Corona you are right !
I am so surprised its working with gawk, I just tried 3.3Mb file. I will post log soon
# 5  
Old 04-26-2013
mawk's main claim to fame is that it's very fast. I rarely see it used but sometimes people bring it in to speed up big problems.

GNU awk on the other hand has fewer limits than most awk, and far more features. You can feed it 10mb lines and it ought to work...eventually.

Last edited by Corona688; 04-26-2013 at 06:43 PM..
# 6  
Old 04-26-2013
Please let me know which awk you prefer(gawk,nawk) personally for data processing and modeling

Last edited by Akshay Hegde; 04-26-2013 at 06:50 PM..
# 7  
Old 04-26-2013
I saw a speed comparison of a bunch of different awks here, some months ago. mawk was the only clear winner. But it's too quirky to use for everything, it breaks some normal-looking scripts for reasons I don't quite understand.

Actually crashing is a new one, though. That's an actual bug. Maybe you can fix that by getting a newer version of mawk.

GNU awk -- and the GNU tools in general -- are nice because they don't have line length limits. Many commercial nawks and seds have limits of 1000 or 2000 characters per line, and many threads here are about how to kludge around that problem.

In the end, though, my brain divides awk into two realms: "GNU Awk", and "Where'd mktime() go". Smilie

Last edited by Corona688; 04-26-2013 at 07:10 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Ubuntu

What is solution for this error "tar: Exiting with failure status due to previous errors"?

Does anyone know what is solution for this error ?tar: Exiting with failure status due to previous errors from last 3 days I am trying to take backup of home/user directory getting again and again same error please anyone give me solution (8 Replies)
Discussion started by: Akshay Hegde
8 Replies

2. Shell Programming and Scripting

need the solution

Write a program to print all prime numbers from 1 to 300. (3 Replies)
Discussion started by: paniruddha
3 Replies
Login or Register to Ask a Question