[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Bug in Python Bindings: Segfault during queue_with_itemdata



Hi Paul, we talked in our weekly meeting today about the lack of clarity for submitting a bug report. Everybody agreed we need to make this better. My personal opinion is that github issues are the best way to do this because:

* It's a very centralized location, directly connected with our publicly-available codebase
* Github issues are unlikely to slip through the cracks, whereas emails get lost
* Github issues are publicly viewable which keeps us accountable

If you have any thoughts I'd love to hear them. Also would love to hear from anybody else who has opinions about this :)

Mark

On Sun, Apr 19, 2020 at 10:16 AM Paul Skopnik <paul@xxxxxxxxxx> wrote:
Hey List,

I've stumbled upon a bug in the Python Bindings v8.9.6. I'm writing here
as there is no clear way to submit a ticket (might require an account?).

The Submit.queue_with_itemdata method causes a segmentation fault when
the iterator passed raises an exception during next(it).
Submit.queue_with_itemdata() should check whether an exception occurred
during next(it) and pass on this exception to its Python caller.

Minimal reproducible example:

```
import htcondor
def my_it():
    raise Exception()
    yield {}

sub = htcondor.Submit()
schedd = htcondor.Schedd()
with schedd.transaction() as txn:
    result = sub.queue_with_itemdata(txn, itemdata=my_it())
```

#6721 ([1]) also describes various segmentation faults, but these are
probably unrelated. I presume this segfault occurs because callers of
[2] do not check for a Python exception and thus use invalid data at
some point.

Cheers,
Paul Skopnik

[1]: https://htcondor-wiki.cs.wisc.edu/index.cgi/tktview?tn=6721
[2]:
https://github.com/htcondor/htcondor/blob/V8_9_6-branch/src/python-bindings/schedd.cpp#L636
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/


--
Mark Coatsworth
Systems Programmer
Center for High Throughput Computing
Department of Computer Sciences
University of Wisconsin-Madison