Bug 1451439 - error: lua script failed: [string "%pretrans(java-1.8.0-openjdk-headless-1:1.8.0.131-1.b12.fc27.s390x)"]:27: attempt to concatenate a nil value (field 'path')
Summary: error: lua script failed: [string "%pretrans(java-1.8.0-openjdk-headless-1:1....
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk
Version: rawhide
Hardware: s390x
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: jiri vanek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-16 16:05 UTC by Richard W.M. Jones
Modified: 2018-11-14 18:36 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-05-19 10:48:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2017-05-16 16:05:51 UTC
Description of problem:

Installing this package fails on Fedora/s390x on Rawhide:

  Running scriptlet: java-1.8.0-openjdk-headless-1:1.8.0.131-1.b12.fc27.s   1/1 
error: lua script failed: [string "%pretrans(java-1.8.0-openjdk-headless-1:1.8.0.131-1.b12.fc27.s390x)"]:27: attempt to concatenate a nil value (field 'path')
Error in PRETRANS scriptlet in rpm package java-1.8.0-openjdk-headless
Error in PRETRANS scriptlet in rpm package java-1.8.0-openjdk-headless

...

  Verifying        : java-1.8.0-openjdk-1:1.8.0.131-1.b12.fc27.s390x     28/132 
java-1.8.0-openjdk-headless-1:1.8.0.131-1.b12.fc27.s390x was supposed to be installed but is not!

...

Failed:
  java-1.8.0-openjdk-headless.s390x 1:1.8.0.131-1.b12.fc27                      


Version-Release number of selected component (if applicable):

java-1.8.0-openjdk-headless.s390x 1:1.8.0.131-1.b12.fc27

How reproducible:

At least once.

Steps to Reproduce:
1. Just install the package.

Comment 1 jiri vanek 2017-05-16 16:30:05 UTC
Hi!

AS this is not replicable on other arches, I will need an HW box.

Comment 2 Richard W.M. Jones 2017-05-17 13:06:34 UTC
I sent details of an s390x server by private email.

Comment 3 jiri vanek 2017-05-18 13:57:35 UTC
(In reply to Richard W.M. Jones from comment #2)
> I sent details of an s390x server by private email.

I run various combinations:

  698  wget https://kojipkgs.fedoraproject.org//packages/java-1.8.0-openjdk/1.8.0.131/1.b12.fc27/s390x/java-1.8.0-openjdk-headless-1.8.0.131-1.b12.fc27.s390x.rpm
  699  sudo dnf install java-1.8.0-openjdk-headless-1.8.0.131-1.b12.fc27.s390x.rpm
  700  sudo dnf remove java-headless
  701  rm -rf /usr/lib/jvm
  702  dnf install java-headless
  703  dnf install --nogpgcheck java-headless
  704  sudo dnf install java-1.8.0-openjdk-headless-1.8.0.131-1.b12.fc27.s390x.rpm
  705  sudo dnf remove java-headless
  706  ll /usr/lib/jvm
  707  ll /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-1.b12.fc27.s390x/jre/lib/security/cacerts 
  708  rm -rf  /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-1.b12.fc27.s390x/
  709  dnf remove copy-jdk-configs
  710  dnf install --nogpgcheck java-headless
  711  dnf remove copy-jdk-configs
  712  ll /usr/lib/jvm
  713  sudo dnf install java-1.8.0-openjdk-headless-1.8.0.131-1.b12.fc27.s390x.rpm
  714  sudo dnf install java-1.8.0-openjdk-headless-1.8.0.131-1.b12.fc27.s390x.rpm copy-jdk-configs
  715  wget https://kojipkgs.fedoraproject.org//packages/copy-jdk-configs/2.2/2.fc26/noarch/copy-jdk-configs-2.2-2.fc26.noarch.rpm
  716  sudo dnf install java-1.8.0-openjdk-headless-1.8.0.131-1.b12.fc27.s390x.rpm copy-jdk-configs-2.2-2.fc26.noarch.rpm 
  717  dnf remove copy-jdk-configs
  718  sudo dnf install java-1.8.0-openjdk-headless copy-jdk-configs-2.2-2.fc26.noarch.rpm 
  719  sudo dnf install --nogpgcheck  java-1.8.0-openjdk-headless copy-jdk-configs-2.2-2.fc26.noarch.rpm 
  720  sudo dnf install java-1.8.0-openjdk-headless-1.8.0.131-1.b12.fc27.s390x.rpm
  721  dnf remove copy-jdk-configs



and never hit the issue:(

Comment 4 Richard W.M. Jones 2017-05-18 14:22:42 UTC
I don't know - I don't have any more information that what I
copied and pasted from the error message.  Perhaps this is a
problem in the %pretrans from the pre-upgraded package?

In any case I had a look at the script itself, and it does
contain:

  package.path = package.path .. ";" .. SOURCE1

I suppose the error means that package.path was not set.
Apparently package.path is a built in variable in Lua itself
which is used to search for Lua packages.

Comment 5 jiri vanek 2017-05-18 14:27:21 UTC
Yes, I read the same. Could there be misconfiguration?

Comment 7 jiri vanek 2017-05-19 10:48:00 UTC
Please feel free to reopen if you hit it agian

Comment 8 Yedidyah Bar David 2018-06-17 08:48:51 UTC
Hi,

We now reproduced current bug several times on oVirt CI [1][2][3]. [3] was pushed with a patch [4] that passes to dnf '--rpmverbosity=debug', but it sadly didn't help me understand why it fails, and I do not know how to further debug this.

Can you please have a look?

Do you want a new bug for this, or reopen current?

Thanks,

[1] https://jenkins.ovirt.org/job/otopi_master_check-patch-fcraw-x86_64/38/
[2] https://jenkins.ovirt.org/job/otopi_master_check-patch-fcraw-x86_64/40/consoleFull
[3] https://jenkins.ovirt.org/job/otopi_master_check-patch-fcraw-x86_64/41/consoleFull
[4] https://gerrit.ovirt.org/92298

Comment 9 Yedidyah Bar David 2018-06-18 07:46:33 UTC
Having read again the lua code in the spec file, I now suspect this is a bug in rpm (or lua?), so adding Panu.

Comment 10 Panu Matilainen 2018-06-18 08:14:46 UTC
Erm. You've no business messing with the configuration of rpm's built-in Lua, such as its paths. From rpm perspective, the relevant bug here is that you can.

For now, I'll just ask nicely that you stop fiddling with package.path, in the future rpm will prevent this one way or the other.

Comment 11 Yedidyah Bar David 2018-06-18 08:46:37 UTC
Hi, I am just the user here :-))

Thanks for replying!

Seems to me like the lua code doing this was written after consulting rpm maintainers, perhaps it should be reconsidered or some other solution provided.

https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/c/8aabfb4c
https://bugzilla.redhat.com/show_bug.cgi?id=1038092
https://bugzilla.redhat.com/show_bug.cgi?id=1290388

Comment 12 jiri vanek 2018-06-18 08:56:05 UTC
I will be most happy to drop the pretrans and post  scriplets fixing the 1038092 and 1290388. All this was added with request on multiple installable, parallel, JDKS (as Oracle  had this). However that would require severe support from rpm and/or yum/dnf.

Comment 13 Yedidyah Bar David 2018-06-18 09:01:16 UTC
Also noting that the failure on oVirt CI seems to have been fixed, likely by a 'dnf update' or something similar, which perhaps included updates to rpm, lua, java*, or whatever other relevant stuff, no idea. So personally I can't reproduce anymore, feel free to ignore. It still might be nice to find a better solution than fiddling with lua internals in the java spec file, so keeping needinfo.

Comment 14 Yedidyah Bar David 2018-10-23 07:01:44 UTC
For the record - this now happened again:

https://jenkins.ovirt.org/job/otopi_master_build-artifacts-fc28-x86_64/27/

https://jenkins.ovirt.org/job/otopi_master_build-artifacts-fc28-x86_64/27/artifact/exported-artifacts/mock_logs/script/stdout_stderr.log

Search above for e.g. "java-1.8.0-openjdk-headless". Snippet follows:


Running transaction
  Running scriptlet: java-1.8.0-openjdk-headless-1:1.8.0.181.b15-6.fc28.x   1/1 
error: lua script failed: [string "%pretrans(java-1.8.0-openjdk-headless-1:1.8.0.181.b15-6.fc28.x86_64)"]:27: attempt to concatenate a nil value (field 'path')
  Preparing        :                                                        1/1 
  Installing       : plexus-utils-3.0.24-5.fc28.noarch                    1/162 
error: java-1.8.0-openjdk-headless-1:1.8.0.181.b15-6.fc28.x86_64: install skipped

Setting needinfo again on Jiri, hoping to get this ignited again.

Jiri - if you suspect this is an infra problem on our (oVirt CI) side, please suggest how to further debug/fix this. Otherwise, please work with rpm maintainers to either fix the failing code so that it does not fail (does not seem so hard, I can try doing this myself, but no idea how to trigger the bug/verify the patch), or replace it altogether with something more robust (in the eyes of the rpm maintainers, at least). I do not think the current situation is so healthy, even if it happens quite seldom. Thanks!

Comment 15 jiri vanek 2018-11-14 18:36:43 UTC
I'm unabel to guess what you are doing.  It is like reading from crystal ball:(


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