|
From: | Longpeng (Mike, Cloud Infrastructure Service Product Dept.) |
Subject: | A bug of Monitor Chardev ? |
Date: | Mon, 17 May 2021 14:56:39 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
We find a race during QEMU starting, which would case the QEMU process coredump. <main loop> | <MON iothread> | [1] create MON chardev | qemu_create_early_backends | chardev_init_func | | [2] create MON iothread | qemu_create_late_backends | mon_init_func | aio_bh_schedule-----------------------> monitor_qmp_setup_handlers_bh [3] enter main loog | tcp_chr_update_read_handler (* A client come in, e.g. Libvirt *) | update_ioc_handlers tcp_chr_new_client | update_ioc_handlers | | [4] create new hup_source | s->hup_source = *PTR1* | g_source_attach(s->hup_source)| | [5] remove_hup_source(*PTR1*) | (create new hup_source) | s->hup_source = *PTR2* [6] g_source_attach_unlocked | *PTR1* is freed by [5] | Do you have any suggestion to fix this bug ? Thanks!
[Prev in Thread] | Current Thread | [Next in Thread] |