MantisBT - opensim
View Issue Details
0007848opensim[GRID] Robust Serverpublic2016-03-18 02:232019-03-21 21:58
aiaustin 
Diva 
normalminorrandom
closedfixed 
PCWindows10
master (dev code) 
master (dev code) 
0.9.0 268 be43fc2
Grid (Multiple Regions per Sim)
ODE
.NET / Windows64
None
N/A
0007848: Incorrect datetime value for column 'TMStamp'
09:04:09 - Incorrect datetime value: '1456736649' for column 'TMStamp' at row 1MySql.Data.MySqlClient.MySqlException (0x80004005): Incorrect datetime value: '1456736649' for column 'TMStamp' at row 1

On the Robust.exe console I am seeing this red error, perhaps once a day. No one seems to be logged in or doing things in world at the time this occurs.

Reporting here in case others are seeing anything similar.

A full exception trace for another example is attached below.
09:07:53 - Incorrect datetime value: '1457082473' for column 'TMStamp' at row 1MySql.Data.MySqlClient.MySqlException (0x80004005): Incorrect datetime value: '1457082473' for column 'TMStamp' at row 1
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at OpenSim.Data.MySQL.MySqlFramework.ExecuteNonQuery(MySqlCommand cmd) in d:\Temp\opensim-0.9.0-268-gbe43fc2\OpenSim\Data\MySQL\MySQLFramework.cs:line 73
09:07:53 - at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at OpenSim.Data.MySQL.MySqlFramework.ExecuteNonQuery(MySqlCommand cmd) in d:\Temp\opensim-0.9.0-268-gbe43fc2\OpenSim\Data\MySQL\MySQLFramework.cs:line 73
   at OpenSim.Data.MySQL.MySqlGroupsInvitesHandler.DeleteOld() in d:\Temp\opensim-0.9.0-268-gbe43fc2\OpenSim\Data\MySQL\MySQLGroupsData.cs:line 437
   at OpenSim.Data.MySQL.MySQLGroupsData.DeleteOldInvites() in d:\Temp\opensim-0.9.0-268-gbe43fc2\OpenSim\Data\MySQL\MySQLGroupsData.cs:line 299
   at OpenSim.Groups.GroupsService.m_CleanupTimer_Elapsed(Object sender, ElapsedEventArgs e) in d:\Temp\opensim-0.9.0-268-gbe43fc2\OpenSim\Addons\Groups\Service\GroupsService.cs:line 124
   at System.Timers.Timer.MyTimerCallback(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()
No tags attached.
has duplicate 0007887new  OpenSim.Data.MySQL.MySqlFramework Incorrect datetime value 
related to 0008118closed nebadon PGSQL - group messages are not deleted at expiry 
related to 0007636new  Avatars cannot login/verify, Diva distro, standalone + OSG on one PC. 
Issue History
2016-03-18 02:23aiaustinNew Issue
2016-03-18 02:25aiaustinDescription Updatedbug_revision_view_page.php?rev_id=5260#r5260
2016-03-18 05:28JeffKelleyNote Added: 0030083
2016-03-18 05:43aiaustinNote Added: 0030084
2016-03-18 05:45aiaustinNote Edited: 0030084bug_revision_view_page.php?bugnote_id=30084#r5262
2016-03-18 05:49aiaustinNote Edited: 0030084bug_revision_view_page.php?bugnote_id=30084#r5263
2016-03-18 06:16JeffKelleyNote Added: 0030085
2016-03-19 02:24aiaustinNote Added: 0030086
2016-03-19 02:25aiaustinNote Edited: 0030086bug_revision_view_page.php?bugnote_id=30086#r5265
2016-03-19 02:26aiaustinNote Edited: 0030086bug_revision_view_page.php?bugnote_id=30086#r5266
2016-03-19 02:26aiaustinNote Edited: 0030086bug_revision_view_page.php?bugnote_id=30086#r5267
2016-03-19 02:28aiaustinNote Edited: 0030086bug_revision_view_page.php?bugnote_id=30086#r5268
2016-03-21 04:07aiaustinNote Added: 0030088
2016-03-21 04:12aiaustinNote Edited: 0030088bug_revision_view_page.php?bugnote_id=30088#r5270
2016-03-21 04:24aiaustinNote Edited: 0030088bug_revision_view_page.php?bugnote_id=30088#r5271
2016-03-21 10:44aiaustinNote Edited: 0030088bug_revision_view_page.php?bugnote_id=30088#r5272
2016-03-21 10:45aiaustinNote Edited: 0030088bug_revision_view_page.php?bugnote_id=30088#r5273
2016-03-22 03:26aiaustinNote Edited: 0030088bug_revision_view_page.php?bugnote_id=30088#r5274
2016-03-22 03:29aiaustinNote Edited: 0030088bug_revision_view_page.php?bugnote_id=30088#r5275
2016-04-22 13:59aiaustinRelationship addedhas duplicate 0007887
2016-05-01 06:17gofasterNote Added: 0030254
2016-05-02 04:15gofasterNote Edited: 0030254bug_revision_view_page.php?bugnote_id=30254#r5372
2016-06-17 12:42DivaNote Added: 0030556
2016-06-17 14:08aiaustinNote Added: 0030560
2016-06-17 14:18aiaustinNote Edited: 0030088bug_revision_view_page.php?bugnote_id=30088#r5531
2016-06-17 14:19aiaustinNote Edited: 0030088bug_revision_view_page.php?bugnote_id=30088#r5532
2016-06-17 14:24aiaustinNote Edited: 0030560bug_revision_view_page.php?bugnote_id=30560#r5534
2016-06-17 14:32aiaustinAdditional Information Updatedbug_revision_view_page.php?rev_id=5536#r5536
2016-06-17 14:36aiaustinNote Edited: 0030560bug_revision_view_page.php?bugnote_id=30560#r5537
2016-06-17 14:37aiaustinAssigned To => Diva
2016-06-17 14:37aiaustinStatusnew => assigned
2016-06-18 01:15aiaustinNote Edited: 0030560bug_revision_view_page.php?bugnote_id=30560#r5540
2016-06-20 01:06aiaustinNote Added: 0030595
2016-06-20 12:45aiaustinNote Edited: 0030595bug_revision_view_page.php?bugnote_id=30595#r5564
2016-06-21 12:18aiaustinNote Edited: 0030560bug_revision_view_page.php?bugnote_id=30560#r5571
2016-06-21 12:22aiaustinNote Added: 0030634
2016-06-21 12:23aiaustinNote Edited: 0030634bug_revision_view_page.php?bugnote_id=30634#r5573
2017-01-09 04:56Gavin HirdRelationship addedrelated to 0008118
2017-01-17 15:14DivaNote Added: 0031560
2017-01-17 15:14DivaStatusassigned => resolved
2017-01-17 15:14DivaResolutionopen => fixed
2019-02-06 11:29BillBlightNote Added: 0034461
2019-02-06 11:29BillBlightStatusresolved => closed
2019-03-21 21:58BillBlightRelationship addedrelated to 0007636

Notes
(0030083)
JeffKelley   
2016-03-18 05:28   
1456736649 is actually a Unix timestamp while os_groups_invites.TMStamp is a MySQL TIMESTAMP (YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS). It should have been stored as 2016-02-29 10:04:09. You are probably running MySQL 5.6 where STRICT_TRANS_TABLES is the default, thus the warning.
(0030084)
aiaustin   
2016-03-18 05:43   
(edited on: 2016-03-18 05:49)
I am running 5.7.10 Community Edition Jeff.

My os_groups_invites table appears to be empty... so I guess this is a transient error thrown by some group invitation code.

Any idea where the Unix time stamp comes from? Maybe we have some variation in the way its done between group implementations?

(0030085)
JeffKelley   
2016-03-18 06:16   
The column is set to auto update and I do not see a reference to a timestamp in AddAgentToGroupInvite, both local and hypergrid.
(0030086)
aiaustin   
2016-03-19 02:24   
(edited on: 2016-03-19 02:28)
So do we have a bug somewhere or does the data base schema need amending?

MySQL, Robust and all regions are on Windows 10, so unless some hypergrid connection is doing this and using Unix, none of my setup should have Unix involved. I am using the built in (default V2) groups code by the way.

(0030088)
aiaustin   
2016-03-21 04:07   
(edited on: 2016-06-17 14:19)
This error (reported in red on the Robust console) seems to occur exactly once every 24 hours. So I wonder if there is some timer triggered event built in with an incorrect Time Stamp?

I can also see some lines in various parts of OpenSim/Addons/Groups/GroupsModule.cs that use

   msg.timestamp = (uint)Util.UnixTimeSinceEpoch();

Is that wrong?

I wonder if I can just remove the STRICT_TRANS_TABLES and strict settings in the MySQL my.ini file? Or if that will cause other issues. I see that "zero parts" in MySQL timestamps can also cause issues after MySQL 5.7.4.

http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes [^]

[Added Note: Openvue grid has been set to run on MySQL 5.7.10 with STRICT_TRANS_MODE removed in my.ini for MySQL and the error does not appear]

(0030254)
gofaster   
2016-05-01 06:17   
(edited on: 2016-05-02 04:15)
THis also happens on a D2 HG enabled Standalone
OpenSim 0.8.2.1 Release (SIMULATION/0.3 - SIMULATION/0.5)
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
mysql Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using EditLine wrapper
Groups V2
---
2016-04-30 19:44:03,019 ERROR - OpenSim.Data.MySQL.MySqlFramework Incorrect datetime value: '1460850243' for column 'TMStamp' a
t row 1
MySql.Data.MySqlClient.MySqlException: Incorrect datetime value: '1460850243' for column 'TMStamp' at row 1
  at MySql.Data.MySqlClient.MySqlStream.ReadPacket () <0x40c91ca0 + 0x0011b> in <filename unknown>:0
  at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int32& insertedId) <0x40c9beb0 + 0x00037>
 in <filename unknown>:0
2016-04-30 19:44:04,195 ERROR - OpenSim.Data.MySQL.MySqlFramework Incorrect datetime value: '1460850244' for column 'TMStamp' a
t row 1
MySql.Data.MySqlClient.MySqlException: Incorrect datetime value: '1460850244' for column 'TMStamp' at row 1
  at MySql.Data.MySqlClient.MySqlStream.ReadPacket () <0x40c91ca0 + 0x0011b> in <filename unknown>:0
  at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int32& insertedId) <0x40c9beb0 + 0x00037>
 in <filename unknown>:0

(0030556)
Diva   
2016-06-17 12:42   
[12:41] <cia-opensim> opensim: diva * r8a070f16ddf4 OpenSim/Data/MySQL (MySQLGroupsData.cs):
[12:41] <cia-opensim> Mantis 0007848: something wrong with a data field in Groups V2
[12:41] <cia-opensim> http://opensimulator.org/viewgit/?a=commit&p=opensim&h=8a070f16ddf49f72dbb925b87f3ae78d4323894e [^]

Please let me know if this fixes the problem
(0030560)
aiaustin   
2016-06-17 14:08   
(edited on: 2016-06-21 12:18)
Thanks @Diva. I have updated the Openvue grid Robust and region services to that GIT master version.

I had avoided the issue before by turning off the now default MySQL 5.7 STRICT_TRANS_TABLES mode.

sql-mode="STRICT_TRANS_TABLES,..."

So I restored that, rebooted and restarted OpenSim afterwards.

The error was occurring before once every 24 hours exactly, so I will watch for errors over the next two days and report back.

(0030595)
aiaustin   
2016-06-20 01:06   
(edited on: 2016-06-20 12:45)
I can report that Openvue grid running with MySQL 5.7.10 and STRICT_TRANS_MODE with http://opensimulator.org/viewgit/?a=commit&p=opensim&h=8a070f16ddf49f72dbb925b87f3ae78d4323894e [^] for 48 hours has not yet shown the TMStamp error... and I believe previously it was showing once every 24 hours.

(0030634)
aiaustin   
2016-06-21 12:22   
(edited on: 2016-06-21 12:23)
This issue appears to be resolved. Assuming that the error occurred once every 24 hours always, it has not shown when running an updated Windows 10 based grid with MySQL 5.7.10 with the default STRICT_TRANS_MODE on.

But before closing this issue it would be helpful if @Diva could check through OpenSim/Addons/Groups/GroupsModule.cs as I am not sure why UnixTimeSinceEpoch() is used in that (4 times, one commented out). See above comments between Jeff Kelley and myself where he indicates the problem might be a Unix Time Stamp used versus a generic MySQL (presumably multi-platform) one.

(0031560)
Diva   
2017-01-17 15:14   
As per reported
(0034461)
BillBlight   
2019-02-06 11:29   
Marked as Resolved but never closed, can be reopened if needed.