SIGSEV in `datetime.timedelta` (possibly from datetime's C `delta_new`)
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Crash report
What happened?
I was testing some AI code with ollama and stumbled across a really weird crash.
The fact that it happens during an IndexError and a specific function has to be there leads me to believe that this is a CPython bug and not an ollama bug.
from ollama import chat
# Has to be here to segfault???
def colorSwitch(color):
print(color, end="", flush=True)
stream = chat(
model="llama3.2", # I think it works with any but this is what I used.
messages=[{"role": "user", "content": ""}],
options={"seed":0}, # Does not need this but I figured it would be helpful
stream=True,
)
# Any iteration works. I just simplified it down to this.
part = next(iter(stream))['message']['content']
temp = part.split("</think>", 1)
# Crash Here
temp[1]
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.13.2 (main, Feb 5 2025, 08:05:21) [GCC 14.2.1 20250128]
Linked PRs
- gh-132599
- gh-132665
- gh-133111
- gh-136152
- gh-136321
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con il riproduttore minimo nell’issue e leggi le PR collegate gh-132599, gh-132665, gh-133111, gh-136152 e gh-136321. Poi esamina il percorso C delta_new di datetime indicato nel report. Il lavoro è completato quando il riproduttore di Python 3.13 non causa più un SIGSEV su Linux.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- c, python
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100