RFR: 8226468: loadquery failed error message displayed

Langer, Christoph christoph.langer at sap.com
Thu Aug 1 11:57:15 UTC 2019


Hi Steve,



you're welcome. I hence removed the jdk12u fix labels from the bug.



Best regards

Christoph



From: Steve Groeger <GROEGES at uk.ibm.com>
Sent: Donnerstag, 1. August 2019 00:45
To: Langer, Christoph <christoph.langer at sap.com>
Cc: jdk-updates-dev at openjdk.java.net
Subject: RE: RFR: 8226468: loadquery failed error message displayed



Hi Christoph,

Thanks for back-porting this to jdk11 and jdk13.
Fully understand reason for not back-porting to jdk12 and am happy with the decision.
Once again thanks for doing this. Much appreciated.

Thanks
Steve Groeger
IBM Runtime Technologies
Hursley, Winchester
Tel: (44) 1962 816911  Mobex: 279990  Mobile: 07718 517 129
Fax (44) 1962 816800
Lotus Notes: Steve Groeger/UK/IBM
Internet: groeges at uk.ibm.com<mailto:groeges at uk.ibm.com>

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

"Langer, Christoph" <christoph.langer at sap.com<mailto:christoph.langer at sap.com>> wrote on 31/07/2019 14:44:53:

> From: "Langer, Christoph" <christoph.langer at sap.com<mailto:christoph.langer at sap.com>>
> To: Steve Groeger <GROEGES at uk.ibm.com<mailto:GROEGES at uk.ibm.com>>, "jdk-updates-
> dev at openjdk.java.net<mailto:dev at openjdk.java.net>" <jdk-updates-dev at openjdk.java.net<mailto:jdk-updates-dev at openjdk.java.net>>
> Date: 31/07/2019 14:45
> Subject: RE: RFR: 8226468: loadquery failed error message displayed
>
> Hi Steve,
>
> I've pushed this clean backport to jdk11u and jdk13u. As JDK12
> updates is obsolete, I'd rather not push it there anymore. What do you think?
>
> Best regards
> Christoph
>
> > -----Original Message-----
> > From: jdk-updates-dev <jdk-updates-dev-bounces at openjdk.java.net<mailto:jdk-updates-dev-bounces at openjdk.java.net>> On
> > Behalf Of Steve Groeger
> > Sent: Dienstag, 23. Juli 2019 01:52
> > To: jdk-updates-dev at openjdk.java.net<mailto:jdk-updates-dev at openjdk.java.net>
> > Subject: RFR: 8226468: loadquery failed error message displayed
> >
> > Hi Thomas,
> >
> > Thanks for handling this change for me.
> > I have requested for the change to be back-ported to jdk11, jdk12 and
> > jdk13.
> > I am still awaiting the agreement to have it back-ported to jdk11, but it
> > has been approved to be back-ported to jdk12 and jdk13.
> > I would be grateful if you could make the changes to these jdk versions.
> > Any issues please let me know.
> >
> > Thanks
> > Steve Groeger
> > IBM Runtime Technologies
> > Hursley, Winchester
> > Tel: (44) 1962 816911  Mobex: 279990  Mobile: 07718 517 129
> > Fax (44) 1962 816800
> > Lotus Notes: Steve Groeger/UK/IBM
> > Internet: groeges at uk.ibm.com<mailto:groeges at uk.ibm.com>
> >
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with number
> > 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> > 3AU
> >
> >
> > "Thomas Stüfe" <thomas.stuefe at gmail.com<mailto:thomas.stuefe at gmail.com>> wrote on 25/06/2019 14:17:19:
> >
> > > From: "Thomas Stüfe" <thomas.stuefe at gmail.com<mailto:thomas.stuefe at gmail.com>>
> > > To: Steve Groeger <GROEGES at uk.ibm.com<mailto:GROEGES at uk.ibm.com>>
> > > Cc: "Baesken, Matthias" <matthias.baesken at sap.com<mailto:matthias.baesken at sap.com>>, ppc-aix-port-dev
> > > <ppc-aix-port-dev at openjdk.java.net<mailto:ppc-aix-port-dev at openjdk.java.net>>
> > > Date: 25/06/2019 14:17
> > > Subject: Re: RFR: 8226468: loadquery failed error message displayed
> > >
> > > Hi Steve,
> > >
> > > looks good. Its fine, we do not need a realloc loop. Keep it simple
> > stupid :)
> > >
> > > I can sponsor this for you.
> > >
> > > ..Thomas
> > >
> > > On Tue, Jun 25, 2019 at 2:57 PM Steve Groeger <GROEGES at uk.ibm.com<mailto:GROEGES at uk.ibm.com>>
> > wrote:
> > > Matthias / Thomas,
> > >
> > > Thanks for all your comments. I have created an issue [1] and also a
> > > webrev [2] to resolve this issue.
> > >
> > > I have just doubled the size of the buffer (to 0x8000) in both
> > > places you mentioned.
> > > If we want to use the same method as used in loadlib_aix.cpp then I
> > > can look at doing that.
> > >
> > > If I can get someone to sponsor this change and to also review the
> > > webrev I would be very grateful.
> > >
> > > Once this has been approved and committed then I would probabamly
> > > look at getting this back-ported to jdk13 and jdk11.
> > >
> > > [1] https://urldefense.proofpoint.com/v2/url?
> u=https-3A__bugs.openjdk.java.net_browse_JDK-2D8226468&d=DwIFAw&c=jf_iaSHvJObTbx-
> siA1ZOg&r=78GW2OHz7nNTH2dBkTx7-
> TKh2QCt3JD3zukzeUO8RpA&m=S1ZeuaNwVYuiGrXlsP8_FGML6tOJrB0n533AjdjpwWA&s=2V5tPY64M-
> EM8f2Rb20s8DaxlRRbE6C2KOls5kE9J9s&e=
> > > [2] https://urldefense.proofpoint.com/v2/url?
> u=http-3A__cr.openjdk.java.net_-7Esgroeger_8226468-2D1_webrev.
> 00_&d=DwIFAw&c=jf_iaSHvJObTbx-siA1ZOg&r=78GW2OHz7nNTH2dBkTx7-
> TKh2QCt3JD3zukzeUO8RpA&m=S1ZeuaNwVYuiGrXlsP8_FGML6tOJrB0n533AjdjpwWA&s=L5911C0ZUA5ljFxJE1-
> duuzBwKKKcTMnHKDDQ-U1XrE&e=
> > >
> > > Thanks
> > > Steve Groeger
> > > IBM Runtime Technologies
> > > Hursley, Winchester
> > > Tel: (44) 1962 816911  Mobex: 279990  Mobile: 07718 517 129
> > > Fax (44) 1962 816800
> > > Lotus Notes: Steve Groeger/UK/IBM
> > > Internet: groeges at uk.ibm.com<mailto:groeges at uk.ibm.com>
> > >
> > > Unless stated otherwise above:
> > > IBM United Kingdom Limited - Registered in England and Wales with
> > > number 741598.
> > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> > 3AU
> > >
> > > "Baesken, Matthias" <matthias.baesken at sap.com<mailto:matthias.baesken at sap.com>> wrote on 25/06/2019
> > 11:19:26:
> > >
> > > > From: "Baesken, Matthias" <matthias.baesken at sap.com<mailto:matthias.baesken at sap.com>>
> > > > To: "Thomas Stüfe" <thomas.stuefe at gmail.com<mailto:thomas.stuefe at gmail.com>>, Steve Groeger
> > > > <GROEGES at uk.ibm.com<mailto:GROEGES at uk.ibm.com>>
> > > > Cc: ppc-aix-port-dev <ppc-aix-port-dev at openjdk.java.net<mailto:ppc-aix-port-dev at openjdk.java.net>>
> > > > Date: 25/06/2019 11:19
> > > > Subject: RE: loadquery failed error message displayed
> > > >
> > > > Hi Steve, please create an issue + patch .
> > > >
> > > > Btw.  I wonder also about   the other  loadquery  usages :
> > > >
> > > >
> > > > java_md_aix.c
> > > >
> > > > static unsigned char dladdr_buffer[0x4000];
> > > >
> > > > 33 return loadquery(L_GETINFO, dladdr_buffer, sizeof(dladdr_buffer));
> > > >
> > > >
> > > > loadlib_aix.cpp
> > > >
> > > > 192 // Call loadquery(L_GETINFO..) to get a list of all loaded Dlls
> > > > from AIX. loadquery
> > > > 198 if (loadquery(L_GETINFO, buffer, buflen) == -1) {
> > > >
> > > >
> > > >
> > > > Maybe you  could also adjust the  buffer size in  java_md_aix.c  as
> > well  ?
> > > > (  The usage  in  loadlib_aix.cpp  uses a buffer reallocation  until
> > > > the size is large enough.  )
> > > >
> > > > Increasing by factor of 2  is fine with me .  But maybe some people
> > > > prefer what we do in  loadlib_aix.cpp (reallocation at runtime ).
> > > >
> > > >
> > > >
> > > >
> > > > Best regards, Matthias
> > > >
> > > >
> > > > From: ppc-aix-port-dev <ppc-aix-port-dev-bounces at openjdk.java.net<mailto:ppc-aix-port-dev-bounces at openjdk.java.net>>
> > > > On Behalf Of Thomas Stüfe
> > > > Sent: Mittwoch, 19. Juni 2019 19:21
> > > > To: Steve Groeger <GROEGES at uk.ibm.com<mailto:GROEGES at uk.ibm.com>>
> > > > Cc: ppc-aix-port-dev <ppc-aix-port-dev at openjdk.java.net<mailto:ppc-aix-port-dev at openjdk.java.net>>
> > > > Subject: Re: loadquery failed error message displayed
> > > >
> > > > Hi Steve,
> > > >
> > > > I wrote this a very long time ago and we never ran into this
> > > > problem, curious that it took so long... but of course, please
> > > > create an issue and do a patch, thanks!
> > > >
> > > > I would probably just increase the buffer by factor 2 or 4.
> > > >
> > > > Cheers, Thomas
> > > >
> > > > On Wed, Jun 19, 2019, 14:19 Steve Groeger <GROEGES at uk.ibm.com<mailto:GROEGES at uk.ibm.com>>
> > wrote:
> > > > Hi all,
> > > >
> > > > We have a scenario where in a Java program after loading some shared
> > > > libraries (using System.loadLibrary) and then calling
> > > > javax.imageio.ImageIO.read(new File(..)) the java program displays
> > > > the following error message:
> > > >
> > > > loadquery failed (12 Not enough space)
> > > >
> > > > This happens when running on AIX with Java 11 using this sample code:
> > > >
> > > > import java.io.File;
> > > > import java.util.Map;
> > > > import javax.imageio.ImageIO;
> > > > public class Reproduce {
> > > >    public static void main(String[] args) {
> > > >        try {
> > > >            System.loadLibrary("mylib");
> > > >
> > > >            String filePath = "...";
> > > >            BufferedImage img = ImageIO.read(new File(filePath));
> > > >
> > > >        }
> > > >        catch (Throwable e) {
> > > >            System.out.println("Exception : " + e);
> > > >            e.printStackTrace();
> > > >        }
> > > >    }
> > > > }
> > > >
> > > > It seems that this is displayed from src/java.desktop/aix/native/
> > > > libawt/porting_aix.c
> > > >
> > > > static unsigned char dladdr_buffer[0x4000];
> > > >
> > > > static void fill_dll_info(void) {
> > > >  int rc = loadquery(L_GETINFO,dladdr_buffer, sizeof(dladdr_buffer));
> > > >  if (rc == -1) {
> > > >    fprintf(stderr, "loadquery failed (%d %s)", errno,
> > strerror(errno));
> > > >    fflush(stderr);
> > > >  }
> > > > }
> > > >
> > > > and is due to the dladdr_info buffer being too small to contain all
> > > > the data returned from the loadquery function.
> > > >
> > > > The same buffer size is also used in src/java.base/aix/native/
> > > > libjli/java_md_aix.c
> > > >
> > > > Could / Should the size of these buffers be increased to handle the
> > > > large data and prevent the error message from being displayed.
> > > > If so, I am happy to raise an issue and to generate a webrev for this.
> >
> > > > What would people suggest as a suitable size for the buffer, ie
> > > > double the size (x8000) or something else?
> > > >
> > > > Thanks
> > > > Steve Groeger
> > > > IBM Runtime Technologies
> > > > Hursley, Winchester
> > > > Tel: (44) 1962 816911  Mobex: 279990  Mobile: 07718 517 129
> > > > Fax (44) 1962 816800
> > > > Lotus Notes: Steve Groeger/UK/IBM
> > > > Internet: groeges at uk.ibm.com<mailto:groeges at uk.ibm.com>
> > > >
> > > > Unless stated otherwise above:
> > > > IBM United Kingdom Limited - Registered in England and Wales with
> > > > number 741598.
> > > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
> > PO6
> > 3AU
> > > > Unless stated otherwise above:
> > > > IBM United Kingdom Limited - Registered in England and Wales with
> > > > number 741598.
> > > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
> > PO6
> > 3AU
> > > Unless stated otherwise above:
> > > IBM United Kingdom Limited - Registered in England and Wales with
> > > number 741598.
> > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> > 3AU
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with number
> > 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> > 3AU
> >
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with number
> > 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> > 3AU
>
>

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



More information about the jdk-updates-dev mailing list