[MDEV-9466] No stacktrace on crash on Windows, if mysqld is running as service Created: 2016-01-26  Updated: 2016-02-03  Resolved: 2016-02-03

Status: Closed
Project: MariaDB Server
Component/s: Platform Windows
Affects Version/s: 5.5, 10.0, 10.1
Fix Version/s: 5.5.48, 10.0.24, 10.1.12

Type: Bug Priority: Major
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None


 Description   

Does not work for me on Windows 10 (don't have another windows to check)
An easy way to reproduce is to inject a crash by using debug break intrinsic, e.g in function sleep(), like below, then start mysqld.exe * as service*, then call SELECT SLEEP(1) from the client.

diff --git a/sql/item_func.cc b/sql/item_func.cc
index 52575a8..5c3c396 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -4610,7 +4610,7 @@ longlong Item_func_sleep::val_int()
   mysql_cond_t cond;
   double timeout;
   int error;
-
+  __debugbreak();
   DBUG_ASSERT(fixed == 1);
 
   timeout= args[0]->val_real();



 Comments   
Comment by Vladislav Vaintroub [ 2016-01-26 ]

Guess it could have been broken here https://github.com/MariaDB/server/commit/44ea4e7c1f90f80ab5cf55f435856acca7a176db
write(STDERR_FILENO, ...) seems wrong, as there is a freopen() done in mysqld.cc.

Generated at Thu Feb 08 07:34:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.