* [PATCH] xfstests 228: suppress core dump message
@ 2010-06-09 15:23 Eric Sandeen
2010-08-12 18:50 ` Eric Sandeen
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2010-06-09 15:23 UTC (permalink / raw)
To: xfs-oss; +Cc: Amit Arora
When running 228 with abrt on in rhel6, I was getting different
output due to a (core dumped) message on SIGXFSZ. For some reason
I wasn't able to use sed to filter it, and just ulimit -c 0 didn't
suppress it either.
abrt sets the core pattern to:
"|/usr/libexec/abrt-hook-ccpp /var/spool/abrt %p %s %u %c""
which apparently allows core dumps even if ulimit -c is 0, due
to the pipe.
Temporarily changing the kernel's core pattern to just plain "core"
and setting ulimit -c to 0 does suppress it. These are reset to
original values after the test is run.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
--- 228.orig 2010-06-09 11:13:27.000000000 -0400
+++ 228 2010-06-09 11:19:57.000000000 -0400
@@ -31,6 +31,8 @@
{
cd /
rm -f $tmp.*
+ sysctl -w kernel.core_pattern="$core_pattern" &>/dev/null
+ ulimit -c $ulimit_c
}
here=`pwd`
@@ -58,6 +60,12 @@
avail=`df -P $TEST_DIR | awk 'END {print $4}'`
[ "$avail" -ge 104000 ] || _notrun "Test device is too small ($avail KiB)"
+# Suppress core dumped messages
+core_pattern=`sysctl kernel.core_pattern | awk -F = '{print $NF}'`
+ulimit_c=`ulimit -c`
+sysctl -w kernel.core_pattern=core &>/dev/null
+ulimit -c 0
+
# Set the FSIZE ulimit to 100MB and check
ulimit -f 102400
flim=`ulimit -f`
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfstests 228: suppress core dump message
2010-06-09 15:23 [PATCH] xfstests 228: suppress core dump message Eric Sandeen
@ 2010-08-12 18:50 ` Eric Sandeen
2010-08-13 12:30 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2010-08-12 18:50 UTC (permalink / raw)
To: xfs-oss
Eric Sandeen wrote:
> When running 228 with abrt on in rhel6, I was getting different
> output due to a (core dumped) message on SIGXFSZ. For some reason
> I wasn't able to use sed to filter it, and just ulimit -c 0 didn't
> suppress it either.
>
> abrt sets the core pattern to:
>
> "|/usr/libexec/abrt-hook-ccpp /var/spool/abrt %p %s %u %c""
>
> which apparently allows core dumps even if ulimit -c is 0, due
> to the pipe.
>
> Temporarily changing the kernel's core pattern to just plain "core"
> and setting ulimit -c to 0 does suppress it. These are reset to
> original values after the test is run.
>
> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
hm ping on this one?
> ---
>
> --- 228.orig 2010-06-09 11:13:27.000000000 -0400
> +++ 228 2010-06-09 11:19:57.000000000 -0400
> @@ -31,6 +31,8 @@
> {
> cd /
> rm -f $tmp.*
> + sysctl -w kernel.core_pattern="$core_pattern" &>/dev/null
> + ulimit -c $ulimit_c
> }
>
> here=`pwd`
> @@ -58,6 +60,12 @@
> avail=`df -P $TEST_DIR | awk 'END {print $4}'`
> [ "$avail" -ge 104000 ] || _notrun "Test device is too small ($avail KiB)"
>
> +# Suppress core dumped messages
> +core_pattern=`sysctl kernel.core_pattern | awk -F = '{print $NF}'`
> +ulimit_c=`ulimit -c`
> +sysctl -w kernel.core_pattern=core &>/dev/null
> +ulimit -c 0
> +
> # Set the FSIZE ulimit to 100MB and check
> ulimit -f 102400
> flim=`ulimit -f`
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfstests 228: suppress core dump message
2010-08-12 18:50 ` Eric Sandeen
@ 2010-08-13 12:30 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2010-08-13 12:30 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
Ugly stuff, but hey the workaround looks correct,
Reviewed-by: Christoph Hellwig <hch@lst.de>
I wish RH wouldn't play such stupid games with core dumps.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-13 12:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09 15:23 [PATCH] xfstests 228: suppress core dump message Eric Sandeen
2010-08-12 18:50 ` Eric Sandeen
2010-08-13 12:30 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox