* [PATCH RFC] Fix "/usr/bin/xargs: rm: Argument list too long" during make distclean
@ 2012-08-13 19:39 David Cullen
2012-08-13 20:38 ` H. Peter Anvin
0 siblings, 1 reply; 5+ messages in thread
From: David Cullen @ 2012-08-13 19:39 UTC (permalink / raw)
To: Michal Marek, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org
When running "make distclean" in a cross chroot environment, the
following messages are emitted:
[user@host:/home/work/linux]: make distclean
/usr/bin/xargs: rm: Argument list too long
make: *** [clean] Error 126
I use the following patch to get around the problem:
diff --git a/Makefile b/Makefile
index b771af5..e2bca8e 100644
--- a/Makefile
+++ b/Makefile
@@ -1033,7 +1033,7 @@ distclean: mrproper
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-o -name '.*.rej' \
-o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
- -type f -print | xargs rm -f
+ -type f -print | xargs -s 122880 rm -f
# Packaging of the kernel to various formats
@@ -1242,7 +1242,7 @@ clean: $(clean-dirs)
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
-o -name '*.symtypes' -o -name 'modules.order' \
-o -name modules.builtin -o -name '.tmp_*.o.*' \
- -o -name '*.gcno' \) -type f -print | xargs rm -f
+ -o -name '*.gcno' \) -type f -print | xargs -s 122880 rm -f
# Generate tags for editors
# ---------------------------------------------------------------------------
Is there another way to solve this problem that does not require
a patch to the Makefile?
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH RFC] Fix "/usr/bin/xargs: rm: Argument list too long" during make distclean
2012-08-13 19:39 [PATCH RFC] Fix "/usr/bin/xargs: rm: Argument list too long" during make distclean David Cullen
@ 2012-08-13 20:38 ` H. Peter Anvin
2012-08-13 20:56 ` David Cullen
0 siblings, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2012-08-13 20:38 UTC (permalink / raw)
To: David Cullen
Cc: Michal Marek, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org
On 08/13/2012 12:39 PM, David Cullen wrote:
> When running "make distclean" in a cross chroot environment, the
> following messages are emitted:
>
> [user@host:/home/work/linux]: make distclean
> /usr/bin/xargs: rm: Argument list too long
> make: *** [clean] Error 126
>
That sounds like a bug in xargs...
-hpa
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RFC] Fix "/usr/bin/xargs: rm: Argument list too long" during make distclean
2012-08-13 20:38 ` H. Peter Anvin
@ 2012-08-13 20:56 ` David Cullen
2012-08-13 21:01 ` H. Peter Anvin
0 siblings, 1 reply; 5+ messages in thread
From: David Cullen @ 2012-08-13 20:56 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Michal Marek, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 967 bytes --]
On 8/13/2012 4:38 PM, H. Peter Anvin wrote:
> On 08/13/2012 12:39 PM, David Cullen wrote:
>> When running "make distclean" in a cross chroot environment, the
>> following messages are emitted:
>>
>> [user@host:/home/work/linux]: make distclean
>> /usr/bin/xargs: rm: Argument list too long
>> make: *** [clean] Error 126
>>
>
> That sounds like a bug in xargs...
>
> -hpa
>
In my specific case, qemu-arm-static calls xargs (In fact, in my
cross chroot, qemu-arm-static is used to run every user mode process).
Do you mean that qemu-arm-static is exposing a latent defect in xargs?
Does qemu-arm-static steal some of the command line space that would
normally be available for xargs? If so, how would xargs figure out
this was happening and handle the problem?
--
Thank you,
David Cullenÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RFC] Fix "/usr/bin/xargs: rm: Argument list too long" during make distclean
2012-08-13 20:56 ` David Cullen
@ 2012-08-13 21:01 ` H. Peter Anvin
2012-08-14 12:54 ` David Cullen
0 siblings, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2012-08-13 21:01 UTC (permalink / raw)
To: David Cullen
Cc: Michal Marek, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org
On 08/13/2012 01:56 PM, David Cullen wrote:
>>
>> That sounds like a bug in xargs...
>>
>
> In my specific case, qemu-arm-static calls xargs (In fact, in my
> cross chroot, qemu-arm-static is used to run every user mode process).
>
> Do you mean that qemu-arm-static is exposing a latent defect in xargs?
>
> Does qemu-arm-static steal some of the command line space that would
> normally be available for xargs? If so, how would xargs figure out
> this was happening and handle the problem?
>
I have no idea. Perhaps strace can help you see what is happening, I
don't know. More likely it is qemu-arm-static that is broken and it is
trying to enforce the old 128K limit that we used to have before 2.6.23.
This could cause a mismatch between what sysconf(_SC_ARG_MAX) returns
and what the actual limit is.
Anyway, even more so the reason to reject this patch.
-hpa
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RFC] Fix "/usr/bin/xargs: rm: Argument list too long" during make distclean
2012-08-13 21:01 ` H. Peter Anvin
@ 2012-08-14 12:54 ` David Cullen
0 siblings, 0 replies; 5+ messages in thread
From: David Cullen @ 2012-08-14 12:54 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Michal Marek, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1278 bytes --]
On 8/13/2012 5:01 PM, H. Peter Anvin wrote:
> On 08/13/2012 01:56 PM, David Cullen wrote:
>>>
>>> That sounds like a bug in xargs...
>>>
>>
>> In my specific case, qemu-arm-static calls xargs (In fact, in my
>> cross chroot, qemu-arm-static is used to run every user mode process).
>>
>> Do you mean that qemu-arm-static is exposing a latent defect in xargs?
>>
>> Does qemu-arm-static steal some of the command line space that would
>> normally be available for xargs? If so, how would xargs figure out
>> this was happening and handle the problem?
>>
>
> I have no idea. Perhaps strace can help you see what is happening, I
> don't know. More likely it is qemu-arm-static that is broken and it is
> trying to enforce the old 128K limit that we used to have before 2.6.23.
> This could cause a mismatch between what sysconf(_SC_ARG_MAX) returns
> and what the actual limit is.
>
> Anyway, even more so the reason to reject this patch.
I submitted a bug report on xargs:
http://savannah.gnu.org/bugs/index.php?37093
I also submitted a bug report on QEMU:
https://bugs.launchpad.net/qemu/+bug/1036645
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-14 12:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-13 19:39 [PATCH RFC] Fix "/usr/bin/xargs: rm: Argument list too long" during make distclean David Cullen
2012-08-13 20:38 ` H. Peter Anvin
2012-08-13 20:56 ` David Cullen
2012-08-13 21:01 ` H. Peter Anvin
2012-08-14 12:54 ` David Cullen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox