0

Hi, after moving our Fogbugz database to a new MySQL-server (on Ubuntu Linux) and running install.sh to upgrade the old install to version 7.1.8, we're getting this error message when we try to access the heartbeat.asp web page:

   ! The Fog Creek Maintenance Service has reported an error. (200) CCmd:
   Argument cannot be null. Parameter name: schema SQL: UPDATE
   DiscussTopic SET dt = DATE_ADD(dt, INTERVAL -3600 SECOND) WHERE
   ixDiscussTopic <= ? AND ixDiscussTopic > ? Params: II 1: 21 2: -979 at
   Wasabi.Runtime.ADO.Cursor.FillSchema (System.Data.DataTable schema)
   [0x00000] at Wasabi.Runtime.ADO.Cursor.set_Reader
   (System.Data.Common.DbDataReader value) [0x00000] at
   Wasabi.Runtime.ADO.KeySetCursor..ctor (System.Data.Common.DbCommand
   command, Boolean noUpdates) [0x00000] at
   Wasabi.Runtime.ADO.KeySetCursor..ctor (System.Data.Common.DbCommand
   command) [0x00000] at Wasabi.Runtime.ADO.RecordSet..ctor
   (Wasabi.Runtime.ADO.Command command) [0x00000] at
   Wasabi.Runtime.ADO.Command.Execute (System.Object ignored1,
   System.Object ignored2, Nullable`1 Options) [0x00000] at
   FogCreek.FogBugz.CCmd.InternalExecute (System.String& sError) [0x00000]
   Wasabi.Runtime.WasabiException (0x80004005): Argument cannot be null.
   Parameter name: schema SQL: UPDATE DiscussTopic SET dt = DATE_ADD(dt,
   INTERVAL -3600 SECOND) WHERE ixDiscussTopic <= ? AND ixDiscussTopic > ?
   Params: II 1: 21 2: -979 at Wasabi.Runtime.ADO.Cursor.FillSchema
   (System.Data.DataTable schema) [0x00000] at
   Wasabi.Runtime.ADO.Cursor.set_Reader (System.Data.Common.DbDataReader
   value) [0x00000] at Wasabi.Runtime.ADO.KeySetCursor..ctor
   (System.Data.Common.DbCommand command, Boolean noUpdates) [0x00000] at
   Wasabi.Runtime.ADO.KeySetCursor..ctor (System.Data.Common.DbCommand
   command) [0x00000] at Wasabi.Runtime.ADO.RecordSet..ctor
   (Wasabi.Runtime.ADO.Command command) [0x00000] at
   Wasabi.Runtime.ADO.Command.Execute (System.Object ignored1,
   System.Object ignored2, Nullable`1 Options) [0x00000] at
   FogCreek.FogBugz.CCmd.InternalExecute (System.String& sError) [0x00000]
   at Wasabi.Runtime.Error.RaiseException (Int32 number, System.String
   source, System.String description, System.String helpfile, Nullable`1
   helpcontext) [0x00000] at FogCreek.FogBugz.CCmd.Execute (Nullable`1
   nCacheClearLevel) [0x00000] at
   FogCreek.FogBugz.CHeartbeatTask.PerformTask (Wasabi.Runtime.Function`3
   fxErr, Int32 nTimeout) [0x00000] at
   FogCreek.FogBugz.__Global.SingleHeartbeat (Int32 cMaxBayesianRequests,
   Int32 cMaxMailMessages, Int32 nEmailTimeout) [0x00000] at
   FogCreek.FogBugz.__Global.StartHeartbeat () [0x00000]

I've tried deleting everything in the DiscussTopic table, and tried dropping it completely, but that didn't do anything to solve this problem.

This command returns a "+":

lynx "http://host.domain.com/FogBugz/heartbeat.asp?fSkipHeartbeatTasks=1"

We tried running the SQL query manually, this worked fine. Is there any way of removing this job from the list of jobs that the maintenance service thinks it should do?

We're also getting problems editing our cases after the upgrade, adding a new case works fine, but when we try to edit them later we get a message saying the webpage was expired.

Any suggestions as to what we could do to fix this problem?

Thanks

flag
This will be fixed in the next release of FogBugz. – Ted Dec 28 2009 at 21:57

3 Answers

1

We will investigate the larger issue with the query. In the meantime, you can skip this backfill by doing the following:

SELECT sValue FROM Setting WHERE sKey = 'ixDiscussTopicTZBackfill';

then

UPDATE SETTING SET sValue = [THE RESULT OF THE QUERY ABOVE] WHERE sKey = 'ixDiscussTopicTZBackfillStop';

link|flag
This did not seem to make a difference. Do we need to restart some process to see if this worked? Same error message as earlier. Note: There is a process running that is looking at ixBugEventLatest backfill, this will be completed within an hour, so we'll check if anything happened when that process is done. – Vegar Nilsen Dec 28 2009 at 16:41
We tried this again and it properly skipped the time backfill. As Ted says above, there is a code fix for this problem in the next FogBugz version. – Brett Kiefer Dec 30 2009 at 15:27
0

There may be something relevant here.
Odd with the old version numbers btw.

Data in Registry
sConnectionString   Driver={mysql};Server=sql01;Database=fogbugz;Uid=fogbugz;Pwd=foo;
sRegistryVersion    4
fDemo   0
sURL    http://support.pht.no/FogBugz
dtLastChecked   2009-12-10 23:57:49
sCurrentVersion 5.0.31
sLatestVersion  6.1.44
dtSupportContractExpires    
ixEarliestOrderNum  
fProduction 0
fDebug  0
dtLastHeartbeat 2009-12-21 14:29:19
sLanguage   en-us
TestKey TestValue
Data in Database
dtLastDailyTask 2009-12-28 00:00:00
fCustom1Persist 1
fCustom2Persist 1
fCustom1Visible 1
fCustom2Visible 1
fAnybodyCanCreateAccounts   0
fCheckForUpdates    1
fFullTextSearchOK   1
fInitialConfigDone  1
fLDAPCanCreateAccounts  0
fLogOnTextBox   1
fPasswordEnable 1
fRememberMeAllowed  1
sCustom1    Version
sCustom2    Computer
sCustom1Help    Enter the version where you observed this case.
sCustom2Help    Describe the computer and software environment where this case occurs.
ixRelBackfill   -1
ixRelBackfillStop   -1
ixBugEventAttachmentBackfill    10001
ixBugEventAttachmentBackfillStop    9983
ixBugEventLatestBackfill    2081
ixBugEventLatestBackfillStop    4817
cbUploadMax 102400000
iAuthType   0
sSMTPServer localhost
sCVSView    default.php?pg=pgInvalidSourceControl
sCVSDiff    default.php?pg=pgInvalidSourceControl
sLocale nb-no
sURLPrefixEmail http://support.pht.no/FogBugz
cMaxEmailToDelete   200
sReplyEmail support@pht.no
fRegistryCleanedFor40   1
nSMTPPort   25
ixLatestTextSummaryBackfill -53
ixLatestTextSummaryBackfillStop 0
dtLastSnippetChange 2009-12-28 11:44:01
fAnybodyCanCreateCommunityAccounts  0
fPluginFailsafe 0
sTimeZoneKey    *
sLDAPServer 
sLDAPDomain 
sLDAPDC 
sLDAPPasswordURL    
ixBugTitleWordsBackfill 0
ixBugEmailBackfill  0
nWordBackfillLine   -1
ixRevisionStrengthBackfill  0
fFBPasswordPolicy   0
fSMTPSSL    0
sSMTPUser   
sSMTPPassword   
sSafeExtList    tar,gzip,gz,zip,bzip,doc,xls,ppt,docx,xlsx,xml,cty,pdf,csv,rar,txt,jpg,jpeg,bmp,gif,png
sSiteSecret 
sSiteSecretOld  
dtSiteSecretRotate  2028-12-09 11:24:47
fProtectActions 1
sCacheVersion   7.1.8-736-20091222093445
nTZOffsetLast   3600
fTrialDB    0
ixAttachmentLogo    -1
ixCategoryDefault   1
sCasePrefix 
dtLastHeartbeat 2009-12-28 14:31:51
fCommunity  1
ixResolvedByBackfill    4816
ixClosedByBackfill  4816
ixLastEditedByBackfill  4816
ixBugTZBackfill -184
ixBugTZBackfillStop 0
ixBugEventTZBackfill    1021328750
ixDiscussTopicTZBackfill    21
ixDiscussTopicTZBackfillStop    0
ixDiscussTopicIPBackfill    21
ixDiscussTopicIPBackfillStop    -1
sForwardToFBSite    
dtLastScheduleMaint 2009-12-28 14:03:20
ixIndexGeneration   6
ixLowestBugEventIndexed 1021327805
ixHighestBugEventIndexed    1021328757
sBugIndexBlacklist  
sPluginModuleId ithv18c0hdojdu0hta9n762eaeuc9i
link|flag
0

Now diagnostic step 6 is done, but the message still says

"It appears some of your cases haven't had their ixBugEventLatest set correctly...."

and the error on "lynx http://support.pht.no/FogBugz/heartbeat.asp" and in
/opt/fogbugz/logs/hb.log persists.

step 7 shows 26 cases as "rouge". "has a bad ixBugEventLatest value (It is set to "NULL")"

And saving a case still fails with "Edit not saved. Your request was made from an expired FogBugz page. For security reasons, please reload this page and repeat the action."

The above registry data was slightly wrong btw. showing:

ixDiscussTopicIPBackfill    21
ixDiscussTopicIPBackfillStop    -1

Now, after finishing step 6 and a reload, it looks as follows.

Data in Registry
sConnectionString   Driver={mysql};Server=sql01;Database=fogbugz;Uid=fogbugz;Pwd=foo;
sRegistryVersion    4
fDemo   0
sURL    http://support.pht.no/FogBugz
dtLastChecked   2009-12-10 23:57:49
sCurrentVersion 5.0.31
sLatestVersion  6.1.44
dtSupportContractExpires    
ixEarliestOrderNum  
fProduction 0
fDebug  0
dtLastHeartbeat 2009-12-21 14:29:19
sLanguage   en-us
TestKey TestValue
Data in Database
dtLastDailyTask 2009-12-28 00:00:00
fCustom1Persist 1
fCustom2Persist 1
fCustom1Visible 1
fCustom2Visible 1
fAnybodyCanCreateAccounts   0
fCheckForUpdates    1
fFullTextSearchOK   1
fInitialConfigDone  1
fLDAPCanCreateAccounts  0
fLogOnTextBox   1
fPasswordEnable 1
fRememberMeAllowed  1
sCustom1    Version
sCustom2    Computer
sCustom1Help    Enter the version where you observed this case.
sCustom2Help    Describe the computer and software environment where this case occurs.
ixRelBackfill   -1
ixRelBackfillStop   -1
ixBugEventAttachmentBackfill    10001
ixBugEventAttachmentBackfillStop    9983
ixBugEventLatestBackfill    4821
ixBugEventLatestBackfillStop    4817
cbUploadMax 102400000
iAuthType   0
sSMTPServer localhost
sCVSView    default.php?pg=pgInvalidSourceControl
sCVSDiff    default.php?pg=pgInvalidSourceControl
sLocale nb-no
sURLPrefixEmail http://support.pht.no/FogBugz
cMaxEmailToDelete   200
sReplyEmail support@pht.no
fRegistryCleanedFor40   1
nSMTPPort   25
ixLatestTextSummaryBackfill -53
ixLatestTextSummaryBackfillStop 0
dtLastSnippetChange 2009-12-28 11:44:01
fAnybodyCanCreateCommunityAccounts  0
fPluginFailsafe 0
sTimeZoneKey    *
sLDAPServer 
sLDAPDomain 
sLDAPDC 
sLDAPPasswordURL    
ixBugTitleWordsBackfill 0
ixBugEmailBackfill  0
nWordBackfillLine   -1
ixRevisionStrengthBackfill  0
fFBPasswordPolicy   0
fSMTPSSL    0
sSMTPUser   
sSMTPPassword   
sSafeExtList    tar,gzip,gz,zip,bzip,doc,xls,ppt,docx,xlsx,xml,cty,pdf,csv,rar,txt,jpg,jpeg,bmp,gif,png
sSiteSecret 
sSiteSecretOld  
dtSiteSecretRotate  2028-12-09 11:24:47
fProtectActions 1
sCacheVersion   7.1.8-736-20091222093445
nTZOffsetLast   3600
fTrialDB    0
ixAttachmentLogo    -1
ixCategoryDefault   1
sCasePrefix 
dtLastHeartbeat 2009-12-28 15:27:40
fCommunity  1
ixResolvedByBackfill    4816
ixClosedByBackfill  4816
ixLastEditedByBackfill  4816
ixBugTZBackfill -184
ixBugTZBackfillStop 0
ixBugEventTZBackfill    1021328750
ixDiscussTopicTZBackfill    21
ixDiscussTopicTZBackfillStop    0
ixDiscussTopicIPBackfill    21
ixDiscussTopicIPBackfillStop    21
sForwardToFBSite    
dtLastScheduleMaint 2009-12-28 15:27:39
ixIndexGeneration   10
ixLowestBugEventIndexed -1
ixHighestBugEventIndexed    -1
sBugIndexBlacklist  
sPluginModuleId ithv18c0hdojdu0hta9n762eaeuc9i
link|flag
Hm.. unchecking "Protect actions against Cross-Site Request Forgery" lets me save edits ok. – Gaute Amundsen Dec 28 2009 at 20:24
Come to think of it the display of the upgrade process was timed out by varnish. We watched mysql "show processlist" to see when it was done. If there was a last step that required a click we may have missed it... – Gaute Amundsen Dec 28 2009 at 20:45
Hi Gaute- This install issue appears to be of a type that does not lend itself to forum discussion. I'm going to reply to your Fogbugz case, and we can distill what we find here. Thanks! Brett – Brett Kiefer Dec 28 2009 at 22:08
The issue with cross-site request forgery turned out to be traceable to these three lines: sSiteSecret sSiteSecretOld dtSiteSecretRotate 2028-12-09 11:24:47 It looks as though the site secret was blank and was not being rotated due to an internationalization bug. We are investigating this possible upgrade bug now. – Brett Kiefer Dec 30 2009 at 15:30

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.