awk dies with: *** glibc detected *** awk: double free or corruption (fasttop):

This document (7003202) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 10 Service Pack 2

Situation

Under certain conditions awk (or gawk) crashes.
Example:

 # ls /usr/lib/* | grep -v "/" | awk '{if (length($1) > 14) {print $1}}'
autofs-ldap-auto-master
*** glibc detected *** awk: double free or corruption (fasttop):
0x000000000054cb10 ***
======= Backtrace: =========
/lib64/libc.so.6[0x2b7155cba31e]
/lib64/libc.so.6(__libc_free+0x6c)[0x2b7155cbbd7c]
awk(str2wstr+0x40)[0x427415]
awk(do_length+0x196)[0x412f16]
awk(r_tree_eval+0x390)[0x42c3a0]
awk(r_tree_eval+0x8b)[0x42c09b]
awk[0x42dce2]
[...shortened, real output is much longer...]

Resolution

SUSE Engineering is aware of the problem and the issue is fixed for SLES10 Service Pack 3.
A fix for Service Pack 2 exists as well, release date is currently unknown.

As a workaround  for the time until a fixed package is relased set locale to "C" inside the script or the shell awk is running. Example:

# export LC_ALL=C
# ls /usr/lib/* | grep -v "/" | awk '{if (length($1) > 14) {print $1}}'
autofs-ldap-auto-master
master-boot-code
bootloader_entry
browserconfig.properties
libsoftokn3.chk
libxpcom_compat.so
[...output shortened...]
 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7003202
  • Creation Date: 04-May-2009
  • Modified Date:11-Mar-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center