Bug 1613577 - Crash with "ValueError: invalid null reference in method 'OptionBinding_newString'" when 'unknown' option (which wasn't previously unknown) in dnf config
Summary: Crash with "ValueError: invalid null reference in method 'OptionBinding_newSt...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libdnf
Version: rawhide
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Marek Blaha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Depends On:
Blocks: F29BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2018-08-07 23:51 UTC by Adam Williamson
Modified: 2018-08-11 00:14 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-11 00:14:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2018-08-07 23:51:31 UTC
The Rawhide 20180807.n.1 compose failed with an error that appears to be a bug in new libdnf:

DEBUG util.py:439:  Unknown configuration option: failovermethod = priority in /var/tmp/imgcreate-UhAP2A/dnf.conf-zSPrjB
DEBUG util.py:439:  ['/', '/boot', '/boot/fw']
DEBUG util.py:439:  Traceback (most recent call last):
DEBUG util.py:439:    File "/usr/bin/appliance-creator", line 190, in <module>
DEBUG util.py:439:      sys.exit(main())
DEBUG util.py:439:    File "/usr/bin/appliance-creator", line 151, in main
DEBUG util.py:439:      creator.install()
DEBUG util.py:439:    File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line 697, in install
DEBUG util.py:439:      excludeWeakdeps=self.excludeWeakdeps)
DEBUG util.py:439:    File "/usr/lib/python2.7/site-packages/imgcreate/dnfinst.py", line 96, in setup
DEBUG util.py:439:      self.conf.read(confpath)
DEBUG util.py:439:    File "/usr/lib/python2.7/site-packages/dnf/conf/config.py", line 585, in read
DEBUG util.py:439:      self._populate(self._parser, self._section, filename, priority)
DEBUG util.py:439:    File "/usr/lib/python2.7/site-packages/dnf/conf/config.py", line 294, in _populate
DEBUG util.py:439:      self._config.optBinds().at(name).newString(priority, value)
DEBUG util.py:439:    File "/usr/lib/python2.7/site-packages/libdnf/conf.py", line 1295, in newString
DEBUG util.py:439:      return _conf.OptionBinding_newString(self, priority, value)
DEBUG util.py:439:  ValueError: invalid null reference in method 'OptionBinding_newString', argument 3 of type 'std::string const &'

note that 'failovermethod' was a valid config option at at least some point in the past. In any case, it shouldn't be triggering a crash (assuming it *is* what triggers the crash).

Full log: https://kojipkgs.fedoraproject.org//work/tasks/8455/28908455/root.log
Task: https://koji.fedoraproject.org/koji/taskinfo?taskID=28908455

This is an automatic F29 Beta blocker as it entirely prevents compose.

Comment 1 Adam Williamson 2018-08-07 23:53:16 UTC
I think this config option comes in via Pungi, btw:

https://pagure.io/pungi/blob/master/f/pungi/gather.py#_346
https://pagure.io/pungi/blob/master/f/pungi/gather.py#_381

Comment 2 Marek Blaha 2018-08-08 07:20:25 UTC
Hi,
please, are you able to provide us with the dnf config file which caused this traceback?
Unknown configuration option: failovermethod is probably innocent here, I can reproduce similar error by adding an empty config option into the config file, for example:
someoption=

Comment 3 Marek Blaha 2018-08-08 07:21:42 UTC
"someoption=" will not work, it must be an existing option, like
proxy=

Comment 4 Marek Blaha 2018-08-08 08:57:50 UTC
PR https://github.com/rpm-software-management/dnf/pull/1168 should fix the "empty option" issue

Comment 5 Adam Williamson 2018-08-08 15:27:16 UTC
Thanks!

"please, are you able to provide us with the dnf config file which caused this traceback?"

Not off hand, no, it's not one of the outputs in the task. Kevin might be able to run a scratch build and pull it out by hand, or something, if you still need it.

Comment 6 Adam Williamson 2018-08-08 17:34:05 UTC
I did a dnf package build for Rawhide with the proposed fix backported, as this is blocking composes and we *really* want to get a compose through.

Comment 7 Adam Williamson 2018-08-11 00:14:24 UTC
This is resolved now, we got a compose. The commit is merged upstream and so it'll naturally be in the next release, so I don't think we still need the bug open.


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