public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: new asm-offsets.h patch problems
@ 2005-09-12 21:02 Luck, Tony
  2005-09-12 23:17 ` Tony Luck
  0 siblings, 1 reply; 15+ messages in thread
From: Luck, Tony @ 2005-09-12 21:02 UTC (permalink / raw)
  To: sam; +Cc: linux-kernel

I ran a loop of:
	$ make mrproper
	$ cp arch/ia64/configs/bigsur_defconfig .config
	$ yes '' | make oldconfig
	$ make -d V=1 prepare
until I had a success and a fail case.  Then diffed the output from the
make -d V=1 prepare part.  The successful one has the "<", the failed
one has the ">".

I editted off the start of the diff, where the only differences are the
process ids and addresses.  Here's the output from "prepare0" to the
end of file.  Note the stuttering "Putting childPutting child" in the
successful case, and that two processes 5577 and 5578 were forked in
the succesful case, while only one was started in the failing case.

Then after the reaping, the successful case decides that it must do
a remake of include/asm-ia64/asm-offsets.h, while the failing case
doesn't.  The immediately preceeding lines to this pronouncement in
both cases are:

   Finished prerequisites of target file `include/asm-ia64/asm-offsets.h'.
   Prerequisite `arch/ia64/kernel/asm-offsets.s' is newer than target `include/asm-ia64/asm-offsets.h'.
   Prerequisite `Kbuild' is older than target `include/asm-ia64/asm-offsets.h'.


Just in case this is a "make" issue, here's the version information:
	$ make --version
	GNU Make 3.80
	Copyright (C) 2002  Free Software Foundation, Inc.
	This is free software; see the source for copying conditions.
	There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
	PARTICULAR PURPOSE.

85410,85411c85408,85409
< Putting child 0x60000000001549d0 (prepare0) PID 5576 on the chain.
< Live child 0x60000000001549d0 (prepare0) PID 5576 
---
> Putting child 0x6000000000155b60 (prepare0) PID 6366 on the chain.
> Live child 0x6000000000155b60 (prepare0) PID 6366 
87593c87591,87592
< Putting childPutting child 0x600000000003ad40 (arch/ia64/kernel/asm-offsets.s) PID 5577 on the chain.
---
> Putting child 0x600000000003adb0 (arch/ia64/kernel/asm-offsets.s) PID 6367 on the chain.
> Live child 0x600000000003adb0 (arch/ia64/kernel/asm-offsets.s) PID 6367 
87595,87598c87594,87595
<  0x600000000003ad40 (arch/ia64/kernel/asm-offsets.s) PID 5577 on the chain.
< Live child 0x600000000003ad40 (arch/ia64/kernel/asm-offsets.s) PID 5577 
< Reaping winning child 0x600000000003ad40 PID 5577 
< Live child 0x600000000003ad40 (arch/ia64/kernel/asm-offsets.s) PID 5578 
---
> Reaping winning child 0x600000000003adb0 PID 6367 
> Live child 0x600000000003adb0 (arch/ia64/kernel/asm-offsets.s) PID 6368 
87601,87602c87598,87599
< Reaping winning child 0x600000000003ad40 PID 5578 
< Removing child 0x600000000003ad40 PID 5578 from chain.
---
> Reaping winning child 0x600000000003adb0 PID 6368 
> Removing child 0x600000000003adb0 PID 6368 from chain.
87650,87657c87647
<   Must remake target `include/asm-ia64/asm-offsets.h'.
< Putting child 0x600000000003ad40 (include/asm-ia64/asm-offsets.h) PID 5584 on the chain.
< Live child 0x600000000003ad40 (include/asm-ia64/asm-offsets.h) PID 5584 
<   	mkdir -p include/asm-ia64/; cat arch/ia64/kernel/asm-offsets.s | (set -e; echo "#ifndef __ASM_OFFSETS_H__"; echo "#define __ASM_OFFSETS_H__"; echo "/*"; echo " * DO NOT MODIFY."; echo " *"; echo " * This file was generated by /home/aegl/bigsur/Kbuild"; echo " *"; echo " */"; echo ""; sed -ne 	"/^->/{s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; echo ""; echo "#endif" ) > include/asm-ia64/asm-offsets.h
< Got a SIGCHLD; 1 unreaped children.
< Reaping winning child 0x600000000003ad40 PID 5584 
< Removing child 0x600000000003ad40 PID 5584 from chain.
<   Successfully remade target file `include/asm-ia64/asm-offsets.h'.
---
>   No need to remake target `include/asm-ia64/asm-offsets.h'.
87662,87663c87652,87653
< Reaping winning child 0x60000000001549d0 PID 5576 
< Removing child 0x60000000001549d0 PID 5576 from chain.
---
> Reaping winning child 0x6000000000155b60 PID 6366 
> Removing child 0x6000000000155b60 PID 6366 from chain.
87668,87671d87657
< ^[]0;aegl@linux-t10:~/bigsur\a[aegl@linux-t10 bigsur]$ w\b \b
< ^[]0;aegl@linux-t10:~/bigsur\a[aegl@linux-t10 bigsur]$ exit
< 
< Script done on Mon 12 Sep 2005 11:37:57 AM PDT

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: new asm-offsets.h patch problems
@ 2005-09-13  0:14 Luck, Tony
  0 siblings, 0 replies; 15+ messages in thread
From: Luck, Tony @ 2005-09-13  0:14 UTC (permalink / raw)
  To: Peter Chubb; +Cc: Sam Ravnborg, linux-kernel

>There's something else wrong too ... make rebuilds everything every
>time on IA64 now, rather than just the things that have changed (when
>compiling with -O)

I've added a "sleep 2" to the arch/ia64/Makefile ... and all my
non-deterministic problems appear to have gone away.

I don't seem this re-build everything problem.  I just tried
a "touch arch/ia64/kernel/efi.c ; make" and it only recompiled
that one file.  That's with the "sleep" in the Makefile, but I
can't imagine it affects this case.

Can you give more details on what you did?

-Tony

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: new asm-offsets.h patch problems
@ 2005-09-12 16:00 Luck, Tony
  2005-09-12 16:50 ` Al Viro
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Luck, Tony @ 2005-09-12 16:00 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

So I still don't understand what is really happening here.

I left my build script running overnight ... working on a
kernel at the 357d596bd... commit (where Linus merged in
my tree last night).  This one has your "archprepare" patch
already included.

Sometimes a build for a config succeeds, and sometimes it
fails. (tiger_defconfig for the last six builds has had a
GOOD, BAD, BAD, BAD, GOOD, GOOD sequence, while bigsur_defconfig
went GOOD, BAD, BAD, BAD, BAD, BAD).  This non-determinism
doesn't fit in well with your explanation of missing defines
for PAGE_SIZE etc.

-Tony

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: new asm-offsets.h patch problems
@ 2005-09-11 21:48 Luck, Tony
  2005-09-11 22:07 ` Sam Ravnborg
  0 siblings, 1 reply; 15+ messages in thread
From: Luck, Tony @ 2005-09-11 21:48 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel


>>  $ cp arch/ia64/configs/bigsur_defconfig .config
>>  $ yes '' | make oldconfig
>
>You can just do:
>make bigsur_defconfig

I only recently found out about that ... but in some cases I still
want to do something like this as I want to make a small tweak from
some of the standard config files (e.g. delete CONFIG_SMP to do a UP
build based on some of the standard configs).

>
>>  $ make prepare
>> 
>> leaves me with an include/asm-ia64/asm-offsets.h that only has the
>> definition of IA64_TASK_SIZE at 0.
>
>I could reproduce this as well.
>Did you actually look at the output of the compile?

Uh, no.  I guess that would have helped me figure out what was happening.

>It looks like the more comprehensive dependency checking hits you now.
>What happens is that the compilation of asm-offsets.c fails due to
>consistency checks in a few places.
>
>First we have in page.h:
>#error Unsupported page size!
>Because CONFIG_IA64_PAGE_SIZE_4KB (8KB, 16KB, 32KB) is not defined.

Ugh.

>Then next we have in same file:
>include/asm/page.h:162: error: `PAGE_SHIFT' undeclared
>That's because CONFIG__HUGETLB_PAGE is set

Presumably more follow-on from not defining any of the PAGE_SIZE
configs.

>etc etc.
>
>The only real fix is to fix the dependencies or provide
>enough defines in your hack.

More ugh.

>I wonder why so many errors occurs with ia64 but not others.
>Do you have a much different .h files layout?

Apparently we do.

>To give you an indication that this is not mission impossible
>I played a bit with the invloved .h files.
  ...
>And since the header files did compile in my case I would say that
>most if not all of the includes are wrong.

Agreed.

>A .h file shall be selfcontained, but not a convinient placeholder
>for including a lot of .h files.
>
>It still leaves of with the original offending IA64_TASK_SIZE,
>but grep did no tell me where task_struct was defined??

It is in include/linux/sched.h

>So I could not try to give that one  spin.
>
>PS. the include of sigframe.h in asm-offsets.c is bad. Please do:
>#include "sigframe.h"

Will fix ... while I'm trying to unravel all the rest of this.

Thanks for all the pointers.

-Tony

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: new asm-offsets.h patch problems
@ 2005-09-11 20:39 Luck, Tony
  2005-09-11 21:36 ` Sam Ravnborg
  0 siblings, 1 reply; 15+ messages in thread
From: Luck, Tony @ 2005-09-11 20:39 UTC (permalink / raw)
  To: Luck, Tony, Sam Ravnborg; +Cc: linux-kernel


>I'll try it.  Hunk#2 of the change to Makefile didn't apply with
>patch ... I had to apply it by hand.

Either I goofed on the hand application of this patch, or it isn't
working.  Curious thing is that it works with some config files, but
not with others.  When I first reported this problem, all my builds
had worked except for the sn2_defconfig one.  With this patch applied
I'm seeing bigsur_defconfig fail quite regularly.

E.g. this sequence (starting from a clean tree):

 $ cp arch/ia64/configs/bigsur_defconfig .config
 $ yes '' | make oldconfig
 $ make prepare

leaves me with an include/asm-ia64/asm-offsets.h that only has the
definition of IA64_TASK_SIZE at 0.

-Tony

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: new asm-offsets.h patch problems
@ 2005-09-11 14:54 Luck, Tony
  0 siblings, 0 replies; 15+ messages in thread
From: Luck, Tony @ 2005-09-11 14:54 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

>Do you recall why you have this make prepare step. It smells like a
>workaround for a missing dependency somewhere.

There used to be a problem with starting out with "make -j8" ... sometimes
offsets.h hadn't been made before another compilation was started that
needed it.  This may have been fixed at some point, but I wired a
"make prepare" into my scripts to avoid it.

>Tony - can you test below patch and tell it this solve the problem you
>see?
>
>Changes outside top-level Makefile and ia64 Makefile is irellevant for
>you.

I'll try it.  Hunk#2 of the change to Makefile didn't apply with
patch ... I had to apply it by hand.

-Tony

^ permalink raw reply	[flat|nested] 15+ messages in thread
* new asm-offsets.h patch problems
@ 2005-09-11  6:07 Luck, Tony
  2005-09-11  7:45 ` Sam Ravnborg
  0 siblings, 1 reply; 15+ messages in thread
From: Luck, Tony @ 2005-09-11  6:07 UTC (permalink / raw)
  To: linux-kernel

I'm sometimes ending up with just "#define IA64_TASK_SIZE 0"
in include/asm-ia64/asm-offsets.h ... but only sometimes.

My build script does "make prepare; make -j8" ... so I guess
there are some races in the parallel build?  The "make prepare"
part used to do the full of build offsets.h, but now it just does
the ia64 hack.

-Tony

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-09-13  0:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-12 21:02 new asm-offsets.h patch problems Luck, Tony
2005-09-12 23:17 ` Tony Luck
  -- strict thread matches above, loose matches on Subject: below --
2005-09-13  0:14 Luck, Tony
2005-09-12 16:00 Luck, Tony
2005-09-12 16:50 ` Al Viro
2005-09-12 19:01   ` Sam Ravnborg
2005-09-12 18:59 ` Sam Ravnborg
2005-09-13  0:08 ` Peter Chubb
2005-09-11 21:48 Luck, Tony
2005-09-11 22:07 ` Sam Ravnborg
2005-09-11 20:39 Luck, Tony
2005-09-11 21:36 ` Sam Ravnborg
2005-09-11 14:54 Luck, Tony
2005-09-11  6:07 Luck, Tony
2005-09-11  7:45 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox