Code Monkey home page Code Monkey logo

Comments (14)

Taymindis avatar Taymindis commented on July 27, 2024 1

@anthony-tuininga
Yes, i did, odpi has no bug or error now. I have sync test with OCI interface(OCI). Both are having same lib error. However, I need to confirm with my team this 7 unique error are commons. It won't be affect the application.

from odpi.

anthony-tuininga avatar anthony-tuininga commented on July 27, 2024

Can you specify how you got this report? Which application did you run?

from odpi.

Taymindis avatar Taymindis commented on July 27, 2024

I'm running on Redhat Linux OS Maipo, I just simple compile the one of the sample.
For example, gcc -I../Include SampleLib.c TestConvertNumber.c -lodpic -ldl
then
valgrind --leak-check=full --track-origins=yes ./a.out

from odpi.

kubo avatar kubo commented on July 27, 2024

Some errors are related to ODPI-C. It tends to forget to allocate additional one byte for nul terminator.

However some errors are related to Oracle libraries. They should be suppressed by a suppression file because ODPI-C cannot fix them.
http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress

from odpi.

cjbj avatar cjbj commented on July 27, 2024

In particular, suppress all the zt* errors.

Valgrind isn't so good with the non-gcc generated binaries that Oracle builds.

from odpi.

anthony-tuininga avatar anthony-tuininga commented on July 27, 2024

Some errors are related to ODPI-C. It tends to forget to allocate additional one byte for nul terminator.

Do you know where these are? I'd happily fix them!

Would it be helpful to ship a Valgrind suppression file? I have one I use internally, for example.

from odpi.

Taymindis avatar Taymindis commented on July 27, 2024

Attached the full valgrind Report for TestConvertNumber.c . However, our dev team will on hold for this issue fixed, debug line number attached for easier look.

output.txt

from odpi.

cjbj avatar cjbj commented on July 27, 2024

@Taymindis if you have an identified ODPI error, please report it. Other valgrind errors in layers beneath ODPI are unlikely to be 'fixed'. I once spent a long time logging bugs on similar issues. When examined by the relevant developers, most were due to the valgrind not dealing correctly with the compiler used by Oracle. I also have a suspicion (with no proof) that some of the zt output is a deliberate way to increase entropy.

from odpi.

Taymindis avatar Taymindis commented on July 27, 2024

@cjbj

This is the part of the test file issue
==18314==
==18314==
==18314== 1 errors in context 11 of 280:
==18314== Invalid read of size 1
==18314== at 0x401245: dpiSamples__getEnvValue (SampleLib.c:58)
==18314== by 0x4014BC: dpiSamples_getParams (SampleLib.c:136)
==18314== by 0x401261: dpiSamples_getConn (SampleLib.c:77)
==18314== by 0x400ECA: main (TestConvertNumbers.c:64)
==18314== Address 0x570f2cd is 0 bytes after a block of size 13 alloc'd
==18314== at 0x4C29BE3: malloc (vg_replace_malloc.c:299)
==18314== by 0x4011D1: dpiSamples__getEnvValue (SampleLib.c:52)
==18314== by 0x4014BC: dpiSamples_getParams (SampleLib.c:136)
==18314== by 0x401261: dpiSamples_getConn (SampleLib.c:77)
==18314== by 0x400ECA: main (TestConvertNumbers.c:64)
==18314==
==18314==
==18314== 1 errors in context 12 of 280:
==18314== Invalid read of size 1
==18314== at 0x401245: dpiSamples__getEnvValue (SampleLib.c:58)
==18314== by 0x40145F: dpiSamples_getParams (SampleLib.c:130)
==18314== by 0x401261: dpiSamples_getConn (SampleLib.c:77)
==18314== by 0x400ECA: main (TestConvertNumbers.c:64)
==18314== Address 0x570f158 is 0 bytes after a block of size 8 alloc'd
==18314== at 0x4C29BE3: malloc (vg_replace_malloc.c:299)
==18314== by 0x4011D1: dpiSamples__getEnvValue (SampleLib.c:52)
==18314== by 0x40145F: dpiSamples_getParams (SampleLib.c:130)
==18314== by 0x401261: dpiSamples_getConn (SampleLib.c:77)
==18314== by 0x400ECA: main (TestConvertNumbers.c:64)
==18314==
==18314==
==18314== 1 errors in context 13 of 280:
==18314== Invalid read of size 1
==18314== at 0x401245: dpiSamples__getEnvValue (SampleLib.c:58)
==18314== by 0x401421: dpiSamples_getParams (SampleLib.c:126)
==18314== by 0x401261: dpiSamples_getConn (SampleLib.c:77)
==18314== by 0x400ECA: main (TestConvertNumbers.c:64)
==18314== Address 0x570f0b7 is 0 bytes after a block of size 7 alloc'd
==18314== at 0x4C29BE3: malloc (vg_replace_malloc.c:299)
==18314== by 0x4011D1: dpiSamples__getEnvValue (SampleLib.c:52)
==18314== by 0x401421: dpiSamples_getParams (SampleLib.c:126)
==18314== by 0x401261: dpiSamples_getConn (SampleLib.c:77)
==18314== by 0x400ECA: main (TestConvertNumbers.c:64)

from odpi.

anthony-tuininga avatar anthony-tuininga commented on July 27, 2024

That particular issue was discovered in the test suite and pushed earlier today. I have just done the same for the samples.

from odpi.

Taymindis avatar Taymindis commented on July 27, 2024

@anthony-tuininga @cjbj
I have shrink down the report by using DRMemory. I think you have more clear about the error is, only 7 Errors.
drmemoryReport.txt

from odpi.

anthony-tuininga avatar anthony-tuininga commented on July 27, 2024

Did you do a pull to get the latest changes to the samples? That should correct the issues on top. The other ones may not be fixable. The full call stack isn't found either. Can you increase that somehow? Valgrind has the option --num-callers to address that.

from odpi.

kubo avatar kubo commented on July 27, 2024

Valgrind isn't so good with the non-gcc generated binaries that Oracle builds.

Thanks. I suspected that valgrind might complains due to intel C compiler.

Do you know where these are? I'd happily fix them!

I found two positions. But sorry, one is different from what I thought. It was already fixed.
The other is oracleHomeLibNameLength in dpiOci__loadLib(). It needs more one byte.

Would it be helpful to ship a Valgrind suppression file? I have one I use internally, for example.

It is helpful not only for me, I think.

from odpi.

anthony-tuininga avatar anthony-tuininga commented on July 27, 2024

@anthony-tuininga
Yes, i did, odpi has no bug or error now. I have sync test with OCI interface(OCI). Both are having same lib error. However, I need to confirm with my team this 7 unique error are commons. It won't be affect the application.

Thanks, @Taymindis. Please close this issue when you have confirmed with your team.

Thanks, @kubo. I have added the extra byte for the ORACLE_HOME library path, as suggested.

from odpi.

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.