Git Product home page Git Product logo

Comments (12)

pevik avatar pevik commented on June 9, 2024

@wangli5665 any change you could have look into it?

from ltp.

metan-ucw avatar metan-ucw commented on June 9, 2024

@mpw5421 Any chance running this under gdb and getting a backtrace? See: https://github.com/linux-test-project/ltp/#debugging-with-gdb

from ltp.

mpw5421 avatar mpw5421 commented on June 9, 2024

@metan-ucw I read the link you provided, but wasn't exactly sure how to execute that.

I ran the test manually under strace since I knew how to do that from troubleshooting other LTP testcases I opened bugs for against RedHat. The output is attached.

strace.ltp.irqbalance.txt

from ltp.

jstancek avatar jstancek commented on June 9, 2024

Doesn't reproduce for me on RHEL9.3. Could you try running it under valgrind? (e.g. valgrind ./irqbalance01)

from ltp.

jstancek avatar jstancek commented on June 9, 2024

Also, is this x86_64 or ppc64le?

from ltp.

mpw5421 avatar mpw5421 commented on June 9, 2024

Also, is this x86_64 or ppc64le?

It's actually s390x on LPAR. Sorry for not including that in the original comment.

Sure, valgrind output attached:

valgrind.ltp.irqbalance.txt

from ltp.

jstancek avatar jstancek commented on June 9, 2024

@mpw5421 Thanks, that looks like we have a bug in test, which fails to parse /proc/interrupts. Could you please attach also output of "cat /proc/interrupts"?

from ltp.

jstancek avatar jstancek commented on June 9, 2024

It appears to be enough to move named interrupts to begging of file to trigger it on x86 as well. "row" variable keeps incrementing and eventually there's a write out-of-bounds:

irqbalance01.c:129: TINFO: Found 8 CPUS, 45 IRQs
realloc(): invalid next size
tst_test.c:1653: TBROK: Test killed by SIGIOT/SIGABRT!

from ltp.

mpw5421 avatar mpw5421 commented on June 9, 2024

Output from cat /proc/interrupts:

interrupts.txt

from ltp.

jstancek avatar jstancek commented on June 9, 2024

Thanks, that confirms my suspicion.
It's a bit too late today, so this could be wrong, but I was thinking:

@@ -154,7 +154,6 @@ static void collect_irq_info(void)
                        if (acc != -1)
                                tst_brk(TBROK, "Unexpected EOL");
                        col = 0;
-                       row++;
                        break;
                case '0' ... '9':
                        if (acc == -1)
@@ -167,6 +166,7 @@ static void collect_irq_info(void)
                        if (acc == -1 || col != 0)
                                tst_brk(TBROK, "Unexpected ':'");
                        irq_ids[row] = acc;
+                       row++;
                        acc = -1;
                        break;
                default:

CC @richiejp

from ltp.

richiejp avatar richiejp commented on June 9, 2024

To be honest I can't remember how it works and I'm not working on LTP at the moment. However it sounds plausible because the parser made a lot of assumptions about the file format.

from ltp.

jstancek avatar jstancek commented on June 9, 2024

v1 patch posted to ML: https://lists.linux.it/pipermail/ltp/2024-January/036666.html

from ltp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.