Bug 12506 - location-importer write fails to export the database
Summary: location-importer write fails to export the database
Status: CLOSED FIXED
Alias: None
Product: Location Database
Classification: Unclassified
Component: libloc (show other bugs)
Version: unspecified
Hardware: all All
: - Unknown - Crash
Assignee: Michael Tremer
QA Contact: Peter Müller
URL:
Keywords:
Depends on:
Blocks: 12499
  Show dependency treegraph
 
Reported: 2020-10-21 09:11 UTC by Peter Müller
Modified: 2020-12-22 10:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Müller 2020-10-21 09:11:50 UTC
"time location-importer --debug --database-host=x --database-name=x --database-username=x --database-password=x write test.db" currently returns:

Traceback (most recent call last):
  File "/usr/bin/location-importer", line 1043, in <module>
    main()
  File "/usr/bin/location-importer", line 1041, in main
    c.run()
  File "/usr/bin/location-importer", line 128, in run
    ret = args.func(args)
  File "/usr/bin/location-importer", line 322, in handle_write
    network = writer.add_network(row.network)
SystemError: <method 'add_network' of 'location.Writer' objects> returned NULL without setting an error                                                                                      

real    98m2.451s
user    1m4.284s
sys     0m0.977s

This is kind of a show-stopper as it prevents me from resolving #12499 et al., since I have no idea how big the database will become and how long the entire export process will take.

My suggestion of this is to be affecting location01 as well.
Comment 1 Michael Tremer 2020-10-23 10:00:22 UTC
> https://git.ipfire.org/?p=location/libloc.git;a=commitdiff;h=26ab419b68d166f932db1f97c38cb9d793d04187

I do not know exactly why we have single IP addresses in the database, but because of that, this crashed. I have now changed it so that it would return a better error message and will accept single IP addresses.
Comment 2 Peter Müller 2020-12-22 10:29:29 UTC
This seems to be fixed meanwhile, I did not observe this error again.