A records.snap stat with a configuration variable's name aborts startup
Mantenedores costumam responder em até 2 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
Start in src/records/RecCore.cc, especially register_record() around the assertion linked in the issue. Trace how RecReadStatsFile() restores snapshot records before registration, and distinguish records restored from the snapshot from records registered with the wrong kind. Reproduce with the described records.snap entry and verify that startup succeeds for the restored record while the assertion still catches an explicitly misregistered record.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
RecReadStatsFile() runs inside RecCoreInit(), before any record is registered, so every stat in records.snap is restored as a new record under its stored name and kind. When the name belongs to a configuration variable, the later registration of that variable finds the restored stat and stops at the release assertion in register_record() (RecCore.cc):
Fatal: src/records/RecCore.cc:75: failed assertion `REC_TYPE_IS_CONFIG(r->rec_type)`
To reproduce, write a records.snap whose one element is a well-formed RECT_PROCESS, RECD_INT record named proxy.config.diags.debug.enabled, with the current version bytes, into the runtime directory, then run traffic_layout info (or start traffic_server). Both abort with SIGABRT. This happens on current master and with #14147 applied: the record is a valid stat, so the reader has no reason to reject it.
Nothing ATS writes puts a configuration name in the snapshot, so this takes a hand-made or damaged file, or a stat that a plugin or an older release registered under a name that is now a configuration variable. It is release-asserted, so a Release build stops too.
The reader cannot reject this without knowing every configuration name, plugin ones included. The place to fix it is register_record(): a record that was only restored from the snapshot, and never registered, should take the kind it is now registered with instead of asserting. The assertion should still hold for a record that some code really did register as the other kind. That changes how every record is registered, not only restored ones, so it is kept out of #14147.
Found during review of #14147.
- Linguagem predominante
- C++
- Estrelas
- 2k
- Forks
- 903
- Merge médio
- 4d 4h
- PRs com merge (30d)
- 135
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apache/trafficserver
-
UnixNetVConnection::do_io_write with a null reader leaves the previous reader in the write VIOTalvez já em andamento @NginxL assumiu hoje. AbertaBug Good First Issue IOBuffer Network
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/trafficserver#14220 ·
Mantenedores costumam responder em até 2 dias
-
MallocAllocator does not check for allocation failureTalvez já em andamento @umrndem assumiu hoje. AbertaBug Core Good First Issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/trafficserver#14218 · 2 comentários ·
Mantenedores costumam responder em até 2 dias
-
Bug Event System Threads
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/trafficserver#14217 ·
Mantenedores costumam responder em até 2 dias
-
TSContScheduleEveryOnPool and TSContScheduleEveryOnThread accept a zero or negative periodTalvez já em andamento @rajeetvk assumiu há 1 dia. AbertaBug Event System Good First Issue TS API
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
apache/trafficserver#14214 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
HostDBContinuation::init memsets a polymorphic ActionTalvez já em andamento @ANMOLSCRIPT assumiu hoje. AbertaBug Good First Issue HostDB
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
apache/trafficserver#14204 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
Todas as issues de apache/trafficserver
Issues semelhantes
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
Mantenedores costumam responder em até 2 dias
-
bug data-types
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
ClickHouse/clickhouse-cpp#645 ·
Mantenedores costumam responder em até 1 dia
-
bug compatibility difficulty:easy prio:normal
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
NatronGitHub/openfx-misc#524 ·
Mantenedores costumam responder em até 1 dia
-
documentation enhancement help wanted P0
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#359 ·
Mantenedores costumam responder em até 1 dia
-
Type: Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
openscad/openscad#7360 · 2 comentários ·
Mantenedores costumam responder em até 1 dia