Bug 12027 - Too many levels of recursion in macro expansion - enhance message please
Summary: Too many levels of recursion in macro expansion - enhance message please
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard: MGA5TOO
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-17 22:28 CET by Morgan Leijström
Modified: 2018-09-06 16:21 CEST (History)
1 user (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
report.bug.tar.gz (339.27 KB, application/octet-stream)
2014-12-18 03:27 CET, Morgan Leijström
Details
the whole /root/drakx/ (587.89 KB, application/octet-stream)
2014-12-18 10:12 CET, Morgan Leijström
Details
report.bug.tar.gz of successful install where i deleted no partition (344.65 KB, application/gzip)
2014-12-18 12:29 CET, Morgan Leijström
Details
Screen picture of "too many levels" etc appearing in vt1 (107.90 KB, image/jpeg)
2014-12-18 12:50 CET, Morgan Leijström
Details
another vt at the same time (97.13 KB, image/jpeg)
2014-12-18 12:52 CET, Morgan Leijström
Details
yet another vt at the same time (121.73 KB, image/jpeg)
2014-12-18 12:52 CET, Morgan Leijström
Details
report.bug.tar.gz Thinkpad T61p 2015-06-10 (350.17 KB, application/gzip)
2015-06-15 09:27 CEST, Morgan Leijström
Details
Screenshot - Too many levels of recursion in macro expansion.jpg (144.45 KB, image/jpeg)
2015-06-15 09:28 CEST, Morgan Leijström
Details
file:///home/morgan/Ut/bug/Screenshot of another terminal when too many levels of recurson shown on another vt.jpg (164.43 KB, image/jpeg)
2015-06-15 09:29 CEST, Morgan Leijström
Details
Invalid opcode in monitor-get-edi and libx86.so seen in a third vt.jpg (159.16 KB, image/jpeg)
2015-06-15 09:31 CEST, Morgan Leijström
Details
here's the "%" in scriplets for each package having one (15.18 KB, text/plain)
2016-10-16 21:02 CEST, Thierry Vignaud
Details
here's the "%" in scriplets for each package having one (after fixing a bunch of them) (7.17 KB, text/plain)
2016-10-16 22:07 CEST, Thierry Vignaud
Details

Description Morgan Leijström 2013-12-17 22:28:14 CET
On some installs, the message
"
error: Too many levels of recursion in macro expansion.  I is likely caused by recursive macro declaration.
 "
It is visible when switching to the vt where some other status is shown.
Last i saw it was right after "Entering step 'Configure X'

And that install did not work.
So i just ran it again, and selected some othe roptions, di dnot see that problem, and install worked.  (mga4b2 DVD iso x86_64)

As I and others have seen it in conjunction with problems, i think it should be a very good idea to add sime kind of log and alarm when this happens.

And maybe it should really have High priority, because if this triggers strange errors, the errors are not easily tracked down of code misbehaves occasionally...



I thought i had mentioned this in a bug a couple years ago, but can not find it.  I found it referenced here though:
https://bugs.mageia.org/show_bug.cgi?id=9306#c5

Reproducible: 

Steps to Reproduce:
Comment 1 Thierry Vignaud 2013-12-17 22:43:56 CET
Likely not the same issue.
That means a current package has a bug.
We would need the /root/drakx/report.bug.xz from the machine you saw that

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud
Component: Installer => RPM Packages

Comment 2 Morgan Leijström 2013-12-18 11:35:23 CET
Unfortunately i could not boot that install so i formatted / and made a new install, and this time did not see that error.

But next time it happens i can read here what to grab, thanks.
Comment 3 Morgan Leijström 2013-12-21 11:21:05 CET
Note to self and other reporters:
switch to console 2 (by pressing "Ctrl-Alt-F2") during installation,
put a floppy in floppy drive or plug a USB key/stick and type 

  bug

then press Enter. It will put report.bug on the floppy/key.

( bluntly copied from https://wiki.mageia.org/en/Triage_guide )
Comment 4 Morgan Leijström 2014-02-03 12:20:38 CET
During reinstallation i saw "Too many levels of recursion in macro expansion" in TTY1 during package installation.  Details mga4 final, 64bit, network install, KDE.  Mirror was stil not completely synced, so it ran a second pass installing over hundred missing packages. When that started i switched to tty1 and saw it had thrown this error recently.

I reuse the same attachement as for bug 12263:
https://bugs.mageia.org/attachment.cgi?id=4923

I have also seen it during step "Configure X" with ATI graphics and nonfree enabled, but not yet with Nvidia graphics.

Summary: Too many levels of recursion in macro expansion. Hunt it down please! => Too many levels of recursion in macro expansion, two places during install

Comment 5 Morgan Leijström 2014-12-18 03:27:39 CET
Created attachment 5721 [details]
report.bug.tar.gz

Here is a file generated by issuing "bug" shortly after i spotted "Too many levels of recursion in macro expansion" which was output on a vt close before or during video driver installation, network installation method using urpmi-proxy.
Unfortunately i can not see such wording in this file, and it scrolled of off that vt when i used "bug".   Next time i will take a photo.

Machine is Tinkpad T61p, 64 bit, Nvidia
Comment 6 Morgan Leijström 2014-12-18 04:25:19 CET
The boot after this install fails: it thinks it need to mount a swap that was in an encrypted lvm created in an earlier install attempt but which i let the installer delete this time.

Bug 14833 

I leave the computer untouched a couple days in case you want me to grab some file or test something.

Some data that control the boot creation?   What can i provide?
Comment 7 Morgan Leijström 2014-12-18 10:12:21 CET
Created attachment 5723 [details]
the whole /root/drakx/

the whole /root/drakx after failed install grabbed using rescue system
(and now i will attempt a new round)

see Bug 14833 - " booting fails - it wants to find partitions the installer deleted (encrypted lvm) "
Comment 8 Morgan Leijström 2014-12-18 12:29:41 CET
Created attachment 5724 [details]
report.bug.tar.gz of successful install where i deleted no partition

I run the installation from the beginning with the exact same settings; this time i did not change any partitions at all, just set their mount points, and it works perfectly.

So, what seem to be wrong is that some partition info (at least swap) is not removed fully when diskdrake/installer deletes an encrypted pv, from wherever boot creation process get its info.
Comment 9 Morgan Leijström 2014-12-18 12:50:02 CET
Created attachment 5726 [details]
Screen picture of "too many levels" etc appearing in vt1

The "too many levels" message here seem to appear just after it have failed to download a file.

The file in case (i see in urpmi-proxy log) is "release-notes..html" 
- yes with double dots before "html"
And the file it got successfully right before have the same name but with single dot.  (to mee it seem weird)
Comment 10 Morgan Leijström 2014-12-18 12:52:03 CET
Created attachment 5727 [details]
another vt at the same time
Comment 11 Morgan Leijström 2014-12-18 12:52:29 CET
Created attachment 5728 [details]
yet another vt at the same time
Comment 12 Morgan Leijström 2014-12-18 12:54:20 CET
Is there some log file that records the "too many levels of macro expansion" message?
As said i have seen it more before and a thorough search wold probably be good.

Keywords: NEEDINFO => (none)

Comment 13 Morgan Leijström 2015-02-18 08:39:27 CET
It is a year old, but in the attachement https://bugs.mageia.org/attachment.cgi?id=4923
of bug 12263 you find this pass:

* trans: scheduling update of kdebase4-workspace-4.11.4-1.mga4.x86_64 (id=13048, file=/mnt/var/cache/urpmi/rpms/kdebase4-workspace-4.11.4-1.mga4.x86_64.rpm)
* trans: scheduling update of plasma-applet-frame-4.11.4-1.mga4.x86_64 (id=735, file=/mnt/var/cache/urpmi/rpms/plasma-applet-frame-4.11.4-1.mga4.x86_64.rpm)
* trans: scheduling update of lib64kcal4-4.11.4-1.mga4.x86_64 (id=3231, file=/mnt/var/cache/urpmi/rpms/lib64kcal4-4.11.4-1.mga4.x86_64.rpm)
* kdebase4-workspace not installed, Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.

One thing is why this happens.

Another thought - maybe we should make the operator see the error so he have better chance to repair if something went wrong?
Comment 14 Morgan Leijström 2015-06-15 09:27:06 CEST
Created attachment 6735 [details]
report.bug.tar.gz Thinkpad T61p 2015-06-10

Seen again, fresh network install on a Thinkpad T61p 2015-06-10
Comment 15 Morgan Leijström 2015-06-15 09:28:14 CEST
Created attachment 6736 [details]
Screenshot - Too many levels of recursion in macro expansion.jpg
Comment 16 Morgan Leijström 2015-06-15 09:29:16 CEST
Created attachment 6737 [details]
file:///home/morgan/Ut/bug/Screenshot of another terminal when too many levels of recurson shown on another vt.jpg
Comment 17 Morgan Leijström 2015-06-15 09:31:02 CEST
Created attachment 6738 [details]
Invalid opcode in monitor-get-edi and libx86.so seen in a third vt.jpg
Morgan Leijström 2015-06-15 09:32:04 CEST

Whiteboard: (none) => MGA5TOO

Comment 18 Morgan Leijström 2015-06-15 13:44:45 CEST
Narrowing the time frame, install on another Thinkpad T41:
I see a line 
 error: Too many levels        etc...
right after the line
 Entering step 'Configure X
And the GUI part ask about to install proprietary driver
Comment 19 Morgan Leijström 2016-04-28 12:42:50 CEST
Problem *not* existent when installing mga6dev1 on a Thinkpad T60 2007-FVG which is a similar machine to the R61 referenced in comment 4 but different GPU, wifi...
( T60 installed correctly and its report.bug is at https://bugs.mageia.org/attachment.cgi?id=7700 )


Not sure what to do about this bug...

Maybe a recommendation: "if installation fail, grab report.bug and look for "recursion" as that may be cause something goes wrong."  And of course look for other errors...
Comment 20 Morgan Leijström 2016-04-28 12:46:34 CEST
Idea:  Could this message

"Too many levels of recursion in macro expansion"

get a "WARNING" prepended:

"WARNING: Too many levels of recursion in macro expansion"

Thus it is easier found when looking for any problems.

Than i think we can leave this issue solved like that: improved visibility
Comment 21 Morgan Leijström 2016-04-28 12:53:05 CEST
Of course it would be very good if the macro in case could be named.  But i guess this is all upstream to whatever is that generates that message.
- What is it?

Summary: Too many levels of recursion in macro expansion, two places during install => Too many levels of recursion in macro expansion - enhance message please

Comment 22 Samuel Verschelde 2016-10-16 15:44:53 CEST
Assigning to all packagers collectively so that someone can have a look at Morgan's logs.

Assignee: bugsquad => pkg-bugs

Comment 23 Thierry Vignaud 2016-10-16 20:33:39 CEST
This message cames from rpm.
There's not much we'll do on that side.
Comment 24 Thierry Vignaud 2016-10-16 21:02:41 CEST
Created attachment 8550 [details]
here's the "%" in scriplets for each package having one

Some of those "%" are OK (eg: date invocation)
Some are obviously buggy (macros that were not expanded at build time b/c of issues)
Comment 25 Thierry Vignaud 2016-10-16 22:07:13 CEST
Created attachment 8552 [details]
here's the "%" in scriplets for each package having one (after fixing a bunch of them)

I've fixed a score of them and filtered the type I errors
roundcubemail-plugins-kolab is one of the biggest offenders...

Attachment 8550 is obsolete: 0 => 1

Comment 26 Morgan Leijström 2016-10-17 08:45:43 CEST
Nice to see this progressing :)
Comment 27 Morgan Leijström 2018-09-06 16:21:14 CEST
Also reported during 6.1 iso testing period
https://bugs.mageia.org/buglist.cgi?quicksearch="Too many levels of recursion in macro expansion"

Note You need to log in before you can comment on or make changes to this bug.