Fatal error glibc detected an invalid stdio handle

I have been searching all over the internet to try and understand why I am getting this error, but I have only ever seen this appear in other programming languages I am unfamiliar with or with code I

I have been searching all over the internet to try and understand why I am getting this error, but I have only ever seen this appear in other programming languages I am unfamiliar with or with code I have never used before.

I am working on a quicksort program for a school assignment, and everything was going well until I decided to consolidate the median bubble sort algorithm into a helper function.

int* QS::MedianSort(int left, int middle, int right) {
    cout << "starting MedianSort...n";////////////
    int temp;
    static int sort [] = { left, middle, right };
    do {
            if (sort[0] <= sort[1] && sort[1] <= sort[2]) {
                break;
            }
            else if (sort[1] < sort[0]) {
                temp = sort[1];
                sort[1] = sort[0];
                sort[0] = temp;
            }
            else if (sort[2] < sort[1]) {
                temp = sort[2];
                sort[2] = sort[1];
                sort[1] = temp;
            }

    } while(true);

    cout << "...returning sort from Median Sortn";//////////
    return sort;
}

An example of its implementation in my partitioning algorithm:

        int *temp;
        int tempInt;

        temp = MedianSort(*(array + left), *(array + pivotIndex), *(array + right));
        *(array + left) = *(temp + 0);
        *(array + pivotIndex) = *(temp + 1);
        *(array + right) = *(temp + 2);

        tempInt = *(array + pivotIndex); 
        *(array + pivotIndex) = *(array + left);
        *(array + left) = tempInt;

array is a pointer to an array that I am quicksorting, left is the smallest index being passed into the partition function, and right is the largest.

When I compile the code, it goes without a problem, but as soon as I run the executable, I get this error in the console:

Fatal error: glibc detected an invalid stdio handle
Aborted

I don’t understand why, because it finishes with the 3rd input file out of 5, but doesn’t even start the 4th file. (I know this because I have cout statements at the beginning almost every function to show me how far it is getting.)

Also, main.cpp has been successfully going through all the files up to this point.

EDIT:
I am compiling with -g -std=c++11

You need to isolate which line of code is causing this error. You could do this by running it in debug50 or by strategically placing some printf statements to find which lines are executing and what is the first line that isn’t being processed. Sometimes, debug will mask an error. When you can’t reproduce it in debug, but can reproduce it when normally executing, it’s time to use the printf technique.

Once you find which line is failing, it should be obvious what the specific problem is that causes this error. However, you’ll have to start thinking about what the underlying problem is and solve that!

I could tell you what’s happening, but you’ll benefit more from doing it yourself. The process will help develop and refine your debugging skills, one of the most important things you can do!

If this answers your question, please click on the check mark to accept. Let’s keep up on forum maintenance. ;-)

[Edit]

Well, it looks like several people didn’t like my answer here. Let me say this. This is a teaching forum, and therefore different from most of Stack Exchange. It’s vastly more important for new programmers to learn how to identify which lines of code causes a seg fault than to simply resolve the problem.

Coding errors like Seg faults and other failures will occur constantly over a programmer’s career. If they can’t locate exactly which lines of code are causing them, then the programmer is seriously handicapped because they haven’t developed that skill. THAT’S why I responded as I did!

That’s why my philosophy is to teach this skill first! Once someone is able to identify a line of code that causes a problem, only then is it appropriate to move on to why a problem is happening.

There’s one more difference. Identifying an offending line of code is a skill that absolutely must be developed through practice and repetition. It’s an intrinsic skill that must be cultivated. Once a line of code is identified as being the source of a bug, then it’s usually a matter of an incorrect usage of something or some other tech issue. Most often, this is the kind of error that can simply be explained, rather than asking the person to try to discover the problem. Frequently, it’s something they’ve done that’s incorrect, but they’ve never been shown what is wrong. Once the issue is described, it’s usually remembered. Over time, with different issues, the programmer will learn to recognize different classes and types of problems and how to resolve them.

For example, a very common problem is this:

isdigit(argv[1])

If this were in someone’s code, it would surely throw a seg fault. But most people don’t know why until it’s explained to them. If someone says «I can’t find the seg fault, can you help?» then they clearly need practice to locate which code would be causing a seg fault. OTOH, if they said, «I’m getting a seg fault from this call to isdigit and I don’t know why!» then it’s clear that they identified the code that is causing the problem and it’s only necessary to expose them to the cause of the seg fault once. They’ll never forget it!. (Incidentally, this could be caused by two different issues. ;-) )

The point of all this is that identifying the offending code is a must-learn skill, while resolving the issues, once identified, is more about seeing the resolution once and remembering it.

Of course, the next phase is learning to deal with deeply buried logic bugs, but that’s an entirely different skill. ;-)

Содержание

  1. Recover: Fatal error: glibc detected an invalid stdio handle
  2. 1 Answer 1
  3. nix-channel segfault: Fatal error: glibc detected an invalid stdio handle #2733
  4. Comments
  5. Fatal error: glibc detected an invalid stdio handle #57
  6. Comments
  7. Description of the problem
  8. Ruby » Ruby master
  9. Сохранённые запросы
  10. Bug #12666
  11. Fatal error: glibc detected an invalid stdio handle
  12. Обновлено shyouhei (Shyouhei Urabe) больше 6 лет назад
  13. Обновлено naruse (Yui NARUSE) больше 6 лет назад
  14. Обновлено vo.x (Vit Ondruch) больше 6 лет назад
  15. Обновлено vo.x (Vit Ondruch) около 6 лет назад
  16. Обновлено kernigh (George Koehler) около 6 лет назад
  17. Обновлено naruse (Yui NARUSE) около 6 лет назад
  18. Обновлено shyouhei (Shyouhei Urabe) около 6 лет назад
  19. Обновлено shyouhei (Shyouhei Urabe) почти 3 года назад
  20. Обновлено vo.x (Vit Ondruch) почти 3 года назад
  21. Installing nix: Fatal error: glibc detected an invalid stdio handle #2805
  22. Comments

Recover: Fatal error: glibc detected an invalid stdio handle

I’m trying to do the recover assignment, but when I try to run it I get the error:

Fatal error: glibc detected an invalid stdio handle Aborted

I have no idea what this means or where to start to diagnose it. I tried Googling more about it but it didn’t give me very good results. Can anyone help me here? Here’s my code:

1 Answer 1

You need to isolate which line of code is causing this error. You could do this by running it in debug50 or by strategically placing some printf statements to find which lines are executing and what is the first line that isn’t being processed. Sometimes, debug will mask an error. When you can’t reproduce it in debug, but can reproduce it when normally executing, it’s time to use the printf technique.

Once you find which line is failing, it should be obvious what the specific problem is that causes this error. However, you’ll have to start thinking about what the underlying problem is and solve that!

I could tell you what’s happening, but you’ll benefit more from doing it yourself. The process will help develop and refine your debugging skills, one of the most important things you can do!

If this answers your question, please click on the check mark to accept. Let’s keep up on forum maintenance. 😉

Well, it looks like several people didn’t like my answer here. Let me say this. This is a teaching forum, and therefore different from most of Stack Exchange. It’s vastly more important for new programmers to learn how to identify which lines of code causes a seg fault than to simply resolve the problem.

Coding errors like Seg faults and other failures will occur constantly over a programmer’s career. If they can’t locate exactly which lines of code are causing them, then the programmer is seriously handicapped because they haven’t developed that skill. THAT’S why I responded as I did!

That’s why my philosophy is to teach this skill first! Once someone is able to identify a line of code that causes a problem, only then is it appropriate to move on to why a problem is happening.

There’s one more difference. Identifying an offending line of code is a skill that absolutely must be developed through practice and repetition. It’s an intrinsic skill that must be cultivated. Once a line of code is identified as being the source of a bug, then it’s usually a matter of an incorrect usage of something or some other tech issue. Most often, this is the kind of error that can simply be explained, rather than asking the person to try to discover the problem. Frequently, it’s something they’ve done that’s incorrect, but they’ve never been shown what is wrong. Once the issue is described, it’s usually remembered. Over time, with different issues, the programmer will learn to recognize different classes and types of problems and how to resolve them.

For example, a very common problem is this:

If this were in someone’s code, it would surely throw a seg fault. But most people don’t know why until it’s explained to them. If someone says «I can’t find the seg fault, can you help?» then they clearly need practice to locate which code would be causing a seg fault. OTOH, if they said, «I’m getting a seg fault from this call to isdigit and I don’t know why!» then it’s clear that they identified the code that is causing the problem and it’s only necessary to expose them to the cause of the seg fault once. They’ll never forget it!. (Incidentally, this could be caused by two different issues. 😉 )

The point of all this is that identifying the offending code is a must-learn skill, while resolving the issues, once identified, is more about seeing the resolution once and remembering it.

Of course, the next phase is learning to deal with deeply buried logic bugs, but that’s an entirely different skill. 😉

Источник

nix-channel segfault: Fatal error: glibc detected an invalid stdio handle #2733

I can provide more info, and a core dump if needed, just ask here or in #nixos.

The text was updated successfully, but these errors were encountered:

For me this looks to be like a curl issue. I have a coredump as well, and I can enable debug symbols if necessary. I’m hexa- on #nixos.

I can reproduce when running as root in a systemd service with nix 2.2.2 on NixOS 19.03.172866.4649b6ef4b5 (Koi).
Works fine in a terminal though.

The command is: $/bin/nix-channel —update nixos-unstable

This happened to me when installing nix on CircleCI (doesn’t happen deterministically, previous installs succeeded):

Apparently the currently known workaround is to retry 🙁

Encountered the same segfault and dump as @mweinelt posted, in my case while invoking a nix-shell , which lead to things being downloaded.

I was able to reproduce this multiple times at the same step in a CI (while having multiple substituters present btw), now trying to reproduce with a Nix version having debug symbols enabled to get a more detailled coredump.

However, as CI is flaky due to other reasons too, and nix pretty slow due to -Og , this might take a while (or never finish at all).

It’s notable that this occurs very frequently (like 50% of the time?) just by running the install script on an azure pipelines ubuntu machine if that helps with anyone trying to reproduce it.

So, we managed to get somewhat better setup to reproduce, and were able to drill it down a bit:

  • The bug is present in Nix 2.2.2 already, not just master
  • Setting —options substituters «» caused the bug to disappear
  • Disabling http2 caused the bug to disappear —options http2 false (requires

Источник

Fatal error: glibc detected an invalid stdio handle #57

Happening with the clang branch on ubuntu 16.10
Running the tests generates:
«Fatal error: glibc detected an invalid stdio handlen»
while they used to work

Description of the problem

./waf —cwd=/home/teto/dce —run test-runner —command-template=»gdb -ex ‘run —suite=dce-process-manager —verbose —tempdir=/tmp/tmp7xpcdjr5 ‘ —args %s «

One _should_ be using ‘#include ‘ to get LIBC_SO and then dlopen that, it’s the only supported solution,
I’ll propose a patch to do that.

The text was updated successfully, but these errors were encountered:

So I went on #glibc to ask how to deal with it but clearly DCE should not tamper with the vtable as it was the goal of the hardening in the first place. So we have to find another way.
So I had a look at https://github.com/direct-code-execution/ns-3-dce/blob/master/model/dce-stdio.cc#L196
and apparently overriding the virtual table just helps setting «errno».
If I take «my_close» as an example, it calls dce_close which sets possibly sets «current->err = EBADF;»
my_close then checks if there was an error and sets «errno = Current ()->err;». Is there a case where this could not be atomic ?
My current idea would be to have dce_close do «errno = current->err = EBADF;» ?

it looks like not related to clang support itself, i removed the project label.

We need to have our own vtable to handle our private syscalls (my_read etc).
I’m going to investigate this.

Dear Hajime,
I’m trying to install NS-3 DCE on Ubuntu 18.04 LTS but we have the same issue.

Please, can you provide some instructions how to overcome this issue?
Thank you!

Источник

Ruby » Ruby master

Сохранённые запросы

Bug #12666

Fatal error: glibc detected an invalid stdio handle

Описание

During build of Ruby for Fedora on PPC64, there is reported following error:

and this is the analysis of one of glibc maintainers:

Please also note that:

To workaround this error, I am going to apply following patch to Fedora:

i.e. I am going to disable the custom code for detecting glibc on various platfors and rely just on ldd. My question is what should be the proper fix? Shouldn’t be the ldd way the default behavior for Linux?

This issue was originally reported at:

Файлы

fiddle-path.diff (1,37 КБ) fiddle-path.diff use plain «libc.so» and «libm.so» with both BSD and Linux kernigh (George Koehler), 04.11.2016 17:15
0001-Do-not-use-full-path-to-load-glibc.patch (947 байта) 0001-Do-not-use-full-path-to-load-glibc.patch vo.x (Vit Ondruch), 06.04.2020 07:30

Обновлено shyouhei (Shyouhei Urabe) больше 6 лет назад

For Fedora the patch seems OK. But I doubt if it could break on other systems like mswin. The fix proposed by the glibc maintainers seems much moderate to me.

Обновлено naruse (Yui NARUSE) больше 6 лет назад

Shyouhei Urabe wrote:

For Fedora the patch seems OK. But I doubt if it could break on other systems like mswin. The fix proposed by the glibc maintainers seems much moderate to me.

Use ldd instead of hard coded list sounds reasonable while ldd exists.

At least OS X doesn’t have ldd(1). (it has otool -L )

Обновлено vo.x (Vit Ondruch) больше 6 лет назад

Actually, in the RHBZ, there are two comments from two glibc maintainers and both suggest to load glibc without specifying path, e.g.:

But this should apply probably also to x86_64-linux.

What I still don’t understand, why there is currently so complex logic how to determine the path, when it could be so easy?

Обновлено vo.x (Vit Ondruch) около 6 лет назад

Ping . any chance to get this fixed? PPC was recently added into primary Fedora builder, so this is troublesome :/ Also, it will make issues to Fedora PPC users as soon as Fedora 25 is release, which should be next Tuesday if I am not mistaken .

Обновлено kernigh (George Koehler) около 6 лет назад

For both BSD and Linux, I want to suggest

Works for me on OpenBSD:

It’s bad to guess the path (like «/usr/lib») or the version number (like «6» in «libc.so.6»). It will break when someone has libc with different path or version number.

I’m attaching patch.

Обновлено naruse (Yui NARUSE) около 6 лет назад

George Koehler wrote:

For both BSD and Linux, I want to suggest

It breaks FreeBSD.

Why you guys breaks other platforms without checking.

Обновлено shyouhei (Shyouhei Urabe) около 6 лет назад

  • Параметр Статус изменился с Open на Assigned
  • Параметр Назначена изменился на tenderlovemaking (Aaron Patterson)

Обновлено shyouhei (Shyouhei Urabe) почти 3 года назад

  • Параметр Статус изменился с Assigned на Feedback

Sorry for a late reply, but I think we have touched this area since you reported. Does this still happen?

Обновлено vo.x (Vit Ondruch) почти 3 года назад

Well, we don’t have PPC64 just PPC64LE on Fedora. I have run 5 builds and all passed just fine. Nevertheless, this is what glibc maintainers said about the issue 1:

(In reply to Florian Weimer from comment #17)

libio vtable verification fails because there are two copies of libc.so.6 in
the process:

0x00003fffb79413a8 — 0x00003fffb7941f78 is __libc_IO_vtables in
/lib64/power8/libc.so.6
0x00003fffb74213c0 — 0x00003fffb7421f90 is __libc_IO_vtables in
/lib64/libc.so.6

IO.pipe refers to a vtable from a the first copy, but the fprintf called via
libffi comes from the second copy.

The root cause is the Fiddle module loading libc.so.6 with an absolute path:

#0 __dlopen (file=0x20728280 «/lib64/libc.so.6», mode=257) at dlopen.c:75
#1 0x00003fffb748782c in rb_fiddle_handle_initialize (argc=,
argv=, self=544821280) at handle.c:179

This is an application defect.

If you’re using a path it’s expected you know what you’re loading.

One should be using ‘#include ‘ to get LIBC_SO and then dlopen that, it’s the only supported solution, particularly consider distributions >that might have /usr/lib64, or multi-arched lib dirs. You could be loading libc.so.6 from an incompatible ABI.

Loding by SONAME is the only safe option.

IOW, I don’t think there should be the path magic.

Источник

Installing nix: Fatal error: glibc detected an invalid stdio handle #2805

I have nuked /nix and want to reinstall, but I am hitting this:

Installation is obviously only partial.

This is a Debian unstable system, with libc6-2.28-5 .

The text was updated successfully, but these errors were encountered:

Installing 2.2.1 via

I believe I encountered the same issue, and that the 2.2.1 fix above also works.

I was running the install in a docker container using centos:latest.

Update: the 2.2.1 fix above does not work for me; the installation completes, but sourcing the profile script does not yield working nix-* commands. It seems to work as-is using a Debian base

I’ve run into the same problem just now on Debian Buster. Interestingly this method of installation does not work:

but this one does:

though both should install the same version of nix.

I get this error non-deterministically. I am installing the exact same version of Nix into a brand-new Vagrant machine, and it fails with this error some percentage of the time.

The version I’m installing is 2.2.2. I’m not using either of the curl or bashisms, but transferring the file to the server and running it directly. (Well, I’m doing it via ansible, but same thing.)

Further info: The VM is Centos 7, and i’m disabling sandboxing since user namespacing isn’t enabled by default there.

Last bit of info: I ran the installer 100 times in a row, and I hit this problem 4 times (4%).

They all look the same as OP’s report, except for a bit of extra info at the end. Maybe it’s nix-channel that is the source of the error?

If the problem really is with nix-channel, then this is effectively solved in 2.3 via b9567aa, which makes nix-channel —update errors non-fatal.

Yeah, I think this is solved in 2.3. I reran the installer another 100 times and got zero failures.

Источник

For Fedora the patch seems OK. But I doubt if it could break on other systems like mswin. The fix proposed by the glibc maintainers seems much moderate to me.

Shyouhei Urabe wrote:

For Fedora the patch seems OK. But I doubt if it could break on other systems like mswin. The fix proposed by the glibc maintainers seems much moderate to me.

Use ldd instead of hard coded list sounds reasonable while ldd exists.

At least OS X doesn’t have ldd(1). (it has otool -L)

Actually, in the RHBZ, there are two comments from two glibc maintainers and both suggest to load glibc without specifying path, e.g.:

when /linux/
  libc_so = "libc.so.6"
  libm_so = "libm.so.6"

But this should apply probably also to x86_64-linux.

What I still don’t understand, why there is currently so complex logic how to determine the path, when it could be so easy?

Ping … any chance to get this fixed? PPC was recently added into primary Fedora builder, so this is troublesome :/ Also, it will make issues to Fedora PPC users as soon as Fedora 25 is release, which should be next Tuesday if I am not mistaken …

  • File fiddle-path.diff fiddle-path.diff added

For both BSD and Linux, I want to suggest

when /bsd|dragonfly|linux/
  libc_so = "libc.so"
  libm_so = "libm.so"

Works for me on OpenBSD:

$ make test-all TESTS=fiddle
...
# Running tests:

Finished tests in 0.598796s, 232.1328 tests/s, 517.7061 assertions/s.           
139 tests, 310 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.4.0dev (2016-11-02 trunk 56542) [x86_64-openbsd6.0]

It’s bad to guess the path (like «/usr/lib») or the version number (like «6» in «libc.so.6»). It will break when someone has libc with different path or version number.

I’m attaching patch.

George Koehler wrote:

For both BSD and Linux, I want to suggest

when /bsd|dragonfly|linux/
  libc_so = "libc.so"
  libm_so = "libm.so"

It breaks FreeBSD.

irb(main):001:0> require"fiddle"
=> true
irb(main):002:0> Fiddle.dlopen("libc.so")
Fiddle::DLError: /usr/lib/libc.so: invalid file format
        from /home/naruse/local/ruby/lib/ruby/2.4.0/fiddle.rb:47:in `initialize'
        from /home/naruse/local/ruby/lib/ruby/2.4.0/fiddle.rb:47:in `new'
        from /home/naruse/local/ruby/lib/ruby/2.4.0/fiddle.rb:47:in `dlopen'
        from (irb):2
        from /home/naruse/local/ruby/bin/irb:11:in `<main>'
irb(main):003:0> Fiddle.dlopen("/lib/libc.so.7")
=> #<Fiddle::Handle:0x000008031a0300>

Why you guys breaks other platforms without checking.

  • Status changed from Open to Assigned
  • Assignee set to tenderlovemaking (Aaron Patterson)
  • Status changed from Assigned to Feedback

Sorry for a late reply, but I think we have touched this area since you reported. Does this still happen?

Well, we don’t have PPC64 just PPC64LE on Fedora. I have run 5 builds and all passed just fine. Nevertheless, this is what glibc maintainers said about the issue 1:

(In reply to Florian Weimer from comment #17)

libio vtable verification fails because there are two copies of libc.so.6 in
the process:

0x00003fffb79413a8 — 0x00003fffb7941f78 is __libc_IO_vtables in
/lib64/power8/libc.so.6
0x00003fffb74213c0 — 0x00003fffb7421f90 is __libc_IO_vtables in
/lib64/libc.so.6

IO.pipe refers to a vtable from a the first copy, but the fprintf called via
libffi comes from the second copy.

The root cause is the Fiddle module loading libc.so.6 with an absolute path:

#0 __dlopen (file=0x20728280 «/lib64/libc.so.6», mode=257) at dlopen.c:75
#1 0x00003fffb748782c in rb_fiddle_handle_initialize (argc=,
argv=, self=544821280) at handle.c:179

This is an application defect.

If you’re using a path it’s expected you know what you’re loading.

One should be using ‘#include <gnu/lib-names.h>’ to get LIBC_SO and then dlopen that, it’s the only supported solution, particularly consider distributions >that might have /usr/lib64, or multi-arched lib dirs. You could be loading libc.so.6 from an incompatible ABI.

Loding by SONAME is the only safe option.

IOW, I don’t think there should be the path magic.

  • Status changed from Feedback to Closed

Thank you for confirmation.

vo.x (Vit Ondruch) wrote in #note-9:

Well, we don’t have PPC64 just PPC64LE on Fedora. I have run 5 builds and all passed just fine.

OK then, let me close this. Don’t hesitate to reopen when something happens again.

Nevertheless, this is what glibc maintainers said about the issue [1]:
(…snip…)

This is an application defect.

Yes. However,

If you’re using a path it’s expected you know what you’re loading.

One should be using ‘#include <gnu/lib-names.h>’ to get LIBC_SO and then dlopen that, it’s the only supported solution, particularly consider distributions
that might have /usr/lib64, or multi-arched lib dirs. You could be loading libc.so.6 from an incompatible ABI.

This doesn’t work for non-glibc situations including *BSD, musl, etc.

Loding by SONAME is the only safe option.

IOW, I don’t think there should be the path magic.

If the world is built on top of glibc, then yes. We can omit the entire libc detection routine. But the reality is not.

  • File 0001-Do-not-use-full-path-to-load-glibc.patch 0001-Do-not-use-full-path-to-load-glibc.patch added
  • Status changed from Closed to Open

shyouhei (Shyouhei Urabe) wrote in #note-10:

Loding by SONAME is the only safe option.

IOW, I don’t think there should be the path magic.

If the world is built on top of glibc, then yes. We can omit the entire libc detection routine. But the reality is not.

This issue is specifically about glibc branches and they should be modified. There should not be provided any path when glibc is detected. That is the problem, not detection and support of other libc implementations.

What glibc maintainers say is that there should never be loaded «/lib64/libc.so.6», it should be «libc.so.6» instead., otherwise there might end up two (different) instances of glibc loaded in memory. This, according to the glibc maintainers, is fault of Ruby and should be fixed.

IOW these two lines are wrong:

https://github.com/ruby/ruby/blob/master/test/fiddle/helper.rb#L50-L51

And they should be just:

   libc_so = "libc.so.6"
   libm_so = "libm.so.6"

Just FTR, this is from the original description:

    0x00003fffb79413a8 - 0x00003fffb7941f78 is __libc_IO_vtables in /lib64/power8/libc.so.6
    0x00003fffb74213c0 - 0x00003fffb7421f90 is __libc_IO_vtables in /lib64/libc.so.6

You can see that two instance of glic are loaded at the same time.

  • Status changed from Open to Assigned
  • Status changed from Assigned to Closed
  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.6: REQUIRED, 2.7: REQUIRED, 3.0: REQUIRED

Just FTR, we are hitting this issue on RHEL8 PPC once again, although we were using quite reduced version of this logic.

Let me explain more context about this backport requests.

Here is current test/fiddle/helper.rb file on ruby/ruby ruby_2_6 branch.

https://github.com/ruby/ruby/blob/02c341c9bc5879eae568ed2ba02cf227ed948199/test/fiddle/helper.rb#L23-L24

https://github.com/ruby/ruby/blob/02c341c9bc5879eae568ed2ba02cf227ed948199/test/fiddle/helper.rb#L102-L103

We have been using the file’s 2nd logic to parse the libc_so, libm_so file paths from the output of ldd /path/to/ruby in RHEL 8 Ruby RPM (downstream) packages. However recently we found a ppc64le Power 9 build environment has the following ldd result.

The actually file paths are /lib64/glibc-hwcaps/power9/libc-2.28.so and /lib64/glibc-hwcaps/power9/libm-2.28.so. The logic by the regular expression failed to parse the paths. The paths are intentional, and due to an optimized version of the libraries.

$ uname -m
ppc64le

$ lscpu | grep -i model
Model:               2.2 (pvr 004e 1202)
Model name:          POWER9, altivec supported

$ ldd /usr/bin/ruby
	linux-vdso64.so.1 (0x00007fff8c650000)
	libruby.so.2.6 => /lib64/libruby.so.2.6 (0x00007fff8c220000)
	libpthread.so.0 => /lib64/glibc-hwcaps/power9/libpthread-2.28.so (0x00007fff8c1d0000)
	librt.so.1 => /lib64/glibc-hwcaps/power9/librt-2.28.so (0x00007fff8c1a0000)
	libgmp.so.10 => /lib64/libgmp.so.10 (0x00007fff8c0f0000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fff8c0c0000)
	libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fff8c070000)
	libm.so.6 => /lib64/glibc-hwcaps/power9/libm-2.28.so (0x00007fff8bf40000)
	libc.so.6 => /lib64/glibc-hwcaps/power9/libc-2.28.so (0x00007fff8bd20000)
	/lib64/ld64.so.2 (0x00007fff8c670000)

And I confirmed the latest change on the master branch works on this environment. While we apply the patch to our downstream Rubies, I would just like to see the patch is applied to Rubies.

  • Backport changed from 2.6: REQUIRED, 2.7: REQUIRED, 3.0: REQUIRED to 2.6: REQUIRED, 2.7: REQUIRED, 3.0: DONE

Fatal error: glibc detected an invalid stdio handle

calendar_today

Updated On:

Products

CA Virtual Privilege Manager

CA Privileged Identity Management Endpoint (PIM)

CA Privileged Access Manager (PAM)

Issue/Introduction

During the installation of the last package of the privileged identity manager endpoint for RHEL 7.5 (SO01532) i got this error
Saving install messages to : /opt/CA/AccessControl/AccessControl_install.log
Fatal error: glibc detected an invalid stdio handle
CA ControlMinder installed new configuration files for seosd.
The files are located in /opt/CA/AccessControl/etc.
You will also find in that directory files you had from
a previous CA ControlMinder installation.
Verify the new created files
Installation complete.

Despite error message all works fine

Should i ignore this error?

Environment

Release:
Component: SEOSU

Resolution

This error can be ignored.
It has to do with old cawin versions not used anymore.
 

Feedback

thumb_up
Yes

thumb_down
No

COVID-19 Response
SplunkBase
Developers
Documentation

Splunk

Sign In

All Apps and Add-ons




cancel


Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.


Showing results for 


Search instead for 

Did you mean: 

Ask a Question

  • Community
  • Splunk Answers
  • Apps and Add-ons
  • All Apps and Add-ons
  • Re: Splunk Check Point LEA OPSEC error : Fatal err…

Options

  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark Topic
  • Subscribe to Topic
  • Mute Topic
  • Printer Friendly Page

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

arrowecssupport

arrowecssupport

Communicator

‎02-01-2018

03:55 AM

    ./pull-cert.sh: line 7:  4740 Aborted                 (core dumped) $cmd
    root@LabSplunk:/opt/splunk/etc/apps/Splunk_TA_checkpoint-opseclea/bin# ./pull-cert.sh 192.168.0.1 SplunkLEA passwd labfirewall.p12

    Fatal error: glibc detected an invalid stdio handle
    ./pull-cert.sh: line 7:  4771 Aborted                 (core dumped) 

$cmd

Tags (3)

  • error
  • Splunk Add-on for Check Point OPSEC LEA
  • splunk-enterprise


0


Karma

Reply

1 Solution

Solved! Jump to solution

Solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content


selim

selim

Path Finder

‎06-12-2018

11:55 PM

I had the exact same issue and it turns out that OPSEC side started to use sha256 and updated its SDK. I downloaded http://supportcontent.checkpoint.com/file_download?id=50832 and replaced $SPLUNK_HOME/etc/apps/Splunk_TA_checkpoint-opseclea/bin/opsec-tools binaries with these new ones. That seems to do the trick.

View solution in original post

7


Karma

Reply


  • All forum topics


  • Previous Topic

  • Next Topic

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

junedec21

junedec21

New Member

‎03-27-2019

02:27 AM

Any resolution steps ?


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

jfeitosa_real

jfeitosa_real

Path Finder

‎04-18-2019

11:58 AM

In my case, I left OPSEC LEA and used the Checkpoint Log Exporter to send via syslog. It comes very complete also in OPSEC.

Thank you.

James m/


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content


jfeitosa_real

jfeitosa_real

Path Finder

‎12-19-2018

05:24 AM

I have the same problem, I downloaded the SDK at http://supportcontent.checkpoint.com/file_download?id=50832 and replaced the $ SPLUNK_HOME / etc / apps / Splunk_TA_checkpoint-opseclea / bin / opsec-tools binaries.
Still the error ‘REST ERROR [400]: Bad Request — Failed to fetch the certificate from server’ appears.

Any idea how to solve it?

Thank You in Advance

James m/


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

nedokpayi

nedokpayi

Splunk Employee

Splunk Employee

‎04-18-2019

11:01 AM

Did you chmod +x the new opsec_pull_cert ?


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content


mreynov_splunk

mreynov_splunk

Splunk Employee

Splunk Employee

‎10-30-2018

02:52 PM

This is a known issue in the addon which stems from Checkpoint OPSEC SDK only working with 32-bit OS flavors: http://docs.splunk.com/Documentation/AddOns/released/OPSEC-LEA/Releasenotes

OPSEC SDK is no longer maintained and Checkpoint recommends Log Exporter instead (which is based on syslog integration and thus avoids OPSEC all together): https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solut…

1


Karma

Reply

Solved! Jump to solution

Solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content


selim

selim

Path Finder

‎06-12-2018

11:55 PM

I had the exact same issue and it turns out that OPSEC side started to use sha256 and updated its SDK. I downloaded http://supportcontent.checkpoint.com/file_download?id=50832 and replaced $SPLUNK_HOME/etc/apps/Splunk_TA_checkpoint-opseclea/bin/opsec-tools binaries with these new ones. That seems to do the trick.

7


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

dgrotenb

dgrotenb

Explorer

‎06-13-2018

04:54 AM

This method worked and allows patching to the latest glibc.
I recommend the solution provided by selim.


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

mlogendra_splun

mlogendra_splun

Splunk Employee

Splunk Employee

‎09-11-2018

05:23 AM

This worked for me. Thank you


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

selim

selim

Path Finder

‎06-13-2018

05:21 AM

Quick update: with this approach I was able to bypass opsec_pull_cert issue; however, we failed to collect any logs and received following errors:

ERROR: Session end reason: SIC ERROR 147 - SIC Error for lea: Authentication error

This may be an issue with either entity_sic_name and/or password. Password worked before and we double checked it. We also checked with checkpoint admins and tried pretty much all possible combinations for various opsec_entity_sic_name entries within the opseclea_connection.conf file. So far no luck :disappointed_face:


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

dgrotenb

dgrotenb

Explorer

‎05-01-2018

10:23 AM

Downgrading glibc to 2.17-196 worked.
There appears to be an issue with the Checkpoint App and glibc version 2.17-222.

yum downgrade glibc glibc-common

2


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

kalaiarasu

kalaiarasu

Explorer

‎05-18-2018

03:18 AM

Hi dgrotenb, what is the command to downgrade in Centos 7, i’m getting this:

yum downgrade glibc glibc-common
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.myduniahost.com
* extras: centos.mirror.myduniahost.com
* updates: centos.mirror.myduniahost.com
Nothing to do

1


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

dgrotenb

dgrotenb

Explorer

‎05-18-2018

04:29 AM

did you run «yum clean all»

Also you may have needed to have a previous version installed for this to work. Worse case you can manually download the 2.17-196 versions use rpm -ivh —force on those rpms to force install them. Not recommended, but an option if nothing else works.


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

dgrotenb

dgrotenb

Explorer

‎04-12-2018

11:32 AM

Seeing this error too.


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

arrowecssupport

arrowecssupport

Communicator

‎02-01-2018

04:08 AM

Any idea why i’m getting this error?


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

socespap

socespap

Explorer

‎09-11-2018

05:03 AM

Hi,

I have the same problem, I have splunk version 7.1.3 and Add-On 4.3.1 and the problem persists. Any idea how to circumvent this issue?

via CLI the error is
[root@splunk bin]# ./pull-cert.sh —help
Fatal error: glibc detected an invalid stdio handle
./pull-cert.sh: line 7: 15906 Aborted $cmd
[root@splunk bin]#

Also verified that pam and glibc are running on the last versions
[root@splunk ~]# yum install glibc.i686
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.ptisp.pt
* extras: centos.mirror.ptisp.pt
* updates: centos.mirror.ptisp.pt
Package glibc-2.17-222.el7.i686 already installed and latest version
Nothing to do
[root@splunk ~]# yum install pam.i686
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.ptisp.pt
* extras: centos.mirror.ptisp.pt
* updates: centos.mirror.ptisp.pt
Package pam-1.1.8-22.el7.i686 already installed and latest version
Nothing to do
[root@splunk ~]#


0


Karma

Reply

Solved! Jump to solution

  • Mark as New
  • Bookmark Message
  • Subscribe to Message
  • Mute Message
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

dgrotenb

dgrotenb

Explorer

‎04-12-2018

11:33 AM

I am seeing this issue too.


0


Karma

Reply

Get Updates on the Splunk Community!

New Splunk Observability innovations: Deeper visibility and smarter alerting to …


You asked, we delivered. Splunk Observability Cloud has several new innovations giving you deeper visibility …

Synthetic Monitoring: Not your Grandma’s Polyester! Tech Talk: DevOps Edition


Register today and join TekStream on Tuesday, February 28 at 11am PT/2pm ET for a demonstration of Splunk …

Instrumenting Java Websocket Messaging


Instrumenting Java Websocket MessagingThis article is a code-based discussion of passing OpenTelemetry trace …

Read our Community Blog >

Powered by Khoros

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Fatal error gettextwrapper unable to write language settings ок
  • Fatal error game has crashed and will close tales of arise
  • Fatal error game crashed truckers mp
  • Fatal error game content version mismatch detected cs go
  • Fatal error fstream no such file or directory

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии