[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.17 v3 13/15] tools/ocaml/xenstored: set uncaught exception handler
- To: Edwin Torok <edvin.torok@xxxxxxxxxx>
- From: Christian Lindig <christian.lindig@xxxxxxxxxx>
- Date: Wed, 9 Nov 2022 14:07:45 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1h8lzpwMN164Fb52sttFjOrxYgGV3lzyi40IB7HY0HE=; b=GG49UXklXpWb44ddqVAQvDZeH/xwAnEUtQOV+h2lqkkv3YPjoMsaGO5r3SKmKmC/PXtHhYH5BJrZsaxfbgOwcDFwn02Wrxr5rR2v9EUtjOSZBw1yiihK8I4/jcEDCtYmb1q4UyrUjsK00DVsxmfUIEXxf0oUK9buBXnFetsQDaRqo8u0cXpV/3RYmTx87gAzyj1FYmyz6znUlTLjrUxavigYcXRR3jjsYLnWUlN9tbX1THu00HwLpEksWzL23xK4fJQLNffH4I36HDkvMLMs+U8HyZoyw0p7I8vCU8BZ1NqxkDMt+Jn9/yguO8PbjursER/coNiTlUxc2QFAogdptA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MRuTPzbmZ9jy0tuAH5J01kpqE+pRGIRNeFaQSYSKrKPTIHKQsOAGob2cqyqpkJ3LohyweiZajiUPnJ5ZJRzes+7unS+l3YvHfBZpdXZdFZVtNkZOcTTb3ngLJJoDbcxF3BCSkcyOlPrDGYr0RE4RytB3+u/e4PaU6BgGHapaJ0JWbzeHZr2ZFMsi8HOQ7Y8hElV1fiL5Z7wjj6gfbGYLN1yNSBzglCbKWm9XFl9p1/uTo+cDop1NBkqaCCE6DBUCa1whPhS2DRmTd8WkEonbPbtzzP7o5mihqtJMui8c1zjkHIlQ6wCSc11ECdUnuj5WFDZXtZGTTL2uGYeLXrdHnw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, David Scott <dave@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
- Delivery-date: Wed, 09 Nov 2022 14:07:55 +0000
- Ironport-data: A9a23:bNzzLqxUOCzfIwzV0zd6t+cJxyrEfRIJ4+MujC+fZmUNrF6WrkVUx mVKC2CHMvuLYmDwfownbom390JX7cCBzIUwGQFqpCAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTbaeYUidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+U0HUMja4mtC5AVnPaET5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KV1O2 aJFEzlcVzzZjcaSx4+0UuU9t8t2eaEHPKtH0p1h5RfwKK98BLzmHeDN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvjmVlVMsuFTuGIO9ltiiTsVPn12Ep 2vAuWD4BB0bO/SUyCaf82LqjejK9c/+cNJOSOzkp6E06LGV7jIUCxYmRQakneGopRKVAN5YI FAxoiV7+MDe82TuFLERRSaQsHOC+xIRRddUO+k78x2WjLrZ5R6DAWoJRSIHb8Yp3OcWSDowx xm2ltXmLTV1tfueTnf13rudsz6aIyUeKm4GIygeQmMt/N3LsIw1yBXVQb5e/LWdi9T0HXT8x m6MpS1n3bEL15dUiuO84EzNhC+qqt7RVAkp6w7LX2WjqARkeIqiYI/u4l/ehRpdELukopC6l CBss6CjAComVPlhSATlrD0xIYyU
- Ironport-hdrordr: A9a23:Ams2baGk9xcxOdj8pLqFS5HXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskdrZJkh8erwW5Vp2RvnhNNICPoqTM2ftW7dySeVxeBZnMHfKljbdxEWmdQtsp uIH5IeNDS0NykDsS+Y2nj2Lz9D+qjgzEnAv463oBlQpENRGthdBmxCe2Sm+zhNNW177O0CZf +hD6R8xwaISDAyVICWF3MFV+/Mq5ngj5T9eyMLABYh9U2nkS6owKSSKWnY4j4uFxd0hZsy+2 nMlAL0oo+5teug9xPa32jPq7xLhdrazMdZDsDksLlUFtyssHfqWG1SYczGgNkHmpDq1L/sqq iKn/4UBbUw15oWRBDynfKi4Xi47N9k0Q6e9bbRuwqenSW+fkN1NyMJv/MmTjLJr0Unp91yy6 RNwiaQsIdWFwrJmGDn68HPTAwCrDv8nZKz+dRj8EC3fLFuH4O5l7Zvin99AdMFBmb3+YonGO 5hAIXV4+tXa0qTazTcsnN0yNKhU3wvFlPeK3Jy8fC9wnxThjR03kEYzMsQkjMJ8488UYBN46 DBPr5znL9DQ8cKZeZ2BfsHQ8GwFmvRKCi8eF66MBDiDuUKKnjNo5n47PE84/yrYoUByN8olJ HIQDpjxBoPkoLVeLizNbFwg2PwqT+GLEXQI+llluhEk6y5Qqb3OiueT11rm9e8opwkc7/mZ8 o=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHY84hRz9ZwhCZsU0y+SHd5jJpHJq42ojKA
- Thread-topic: [PATCH for-4.17 v3 13/15] tools/ocaml/xenstored: set uncaught exception handler
> On 8 Nov 2022, at 15:34, Edwin Török <edvin.torok@xxxxxxxxxx> wrote:
>
> Helps debug fatal errors during live update
>
> Previously this would've just gone to /dev/null, because:
> * daemonize reopens stderr as /dev/null
> * systemd redirects stderr to /dev/null too
>
> Previously the only way to debug this was to manually run oxenstored with
> --no-fork, but when you have a fatal error and oxenstored just
> disappears you'd want to know why.
> There has been at least one observed instance of a bug where oxenstored
> just disappeared inexplicably (it was believed due to an OOM exception).
>
> Signed-off-by: Edwin Török <edvin.torok@xxxxxxxxxx>
> ---
> Reason for inclusion in 4.17:
> - avoids losing crucial information during a fatal error (e.g. during
> live update)
Acked-by: Christian Lindig <christian.lindig@xxxxxxxxxx>
> +let print_flush msg =
> + prerr_endline msg;
> + flush stderr
The flush is not required because prerr_endline does it implicitly.
|