Commit graph

4811 commits

Author SHA1 Message Date
Ashod Nakashian
11c08d7663 wsd: remove logging of detailed memory stats
Change-Id: Id804cc342d786e745d7ac214ea72b198bf0b639b
2017-02-05 22:08:23 -05:00
Ashod Nakashian
7d58df49fa wsd: new config to enable/disable snapshots when recording trace
By default snapshots are disabled, since trace recording
is enabled, to avoid unexpectedly flooding the disk.

Change-Id: I6c8728e14801f0a72accde1378455ec0e6046e3e
2017-02-05 22:03:18 -05:00
Ashod Nakashian
57212b69b8 wsd: take snapshot of source file before trace recording
Change-Id: Ia3e25467a20d2442dcf0497c21a8fdce2efedbc2
2017-02-05 21:59:23 -05:00
Ashod Nakashian
64335b4127 wsd: correctly initialize forkit pid in Admin
Change-Id: I376742fa324f207d77fa290046657f17f8872b27
2017-02-05 21:59:23 -05:00
Ashod Nakashian
a7afc59e51 wsd: trace files support timestamp to prevent overwritting on restart
Change-Id: Ided928e7428d35f9ed322720ea306e090bdd0c38
2017-02-05 21:59:23 -05:00
Ashod Nakashian
0476d1d9f2 wsd: don't complain to the user on idle termination
We no longer tell the clinet "This is embarrassing..."
when we disconnect and unload an idle document. Instead,
the client UI remains greyed out so the user can resume
as if it was inactive (and reload the document in this case).

Also, we now always send the "close: " message prior
to shutting down a client websocket. This is more
reasonable and consistent when we intentionally disconnect,
so clients can rely on it to signal intent and give reason.

Otherwise, a disconnection without this application-level
message should be unexpected and is therefore reasonable
to show the "This is embarrassing..." message.

Change-Id: Ic7439bcc9267be155586ccd5d122e9fe60225516
2017-02-05 21:59:23 -05:00
Ashod Nakashian
b095e06173 wsd: fix crash when unloading idle documents
A race condition between the client socket thread
and the idle-document cleanup caused segfault
on the websocket.

Now the ChildProcess object doesn't reset
the websocket on closing, rather on destruction.

Change-Id: I10d0dfb1ba677a65479df85b7a53de8c5f1b44c3
2017-02-05 21:59:23 -05:00
Ashod Nakashian
5cac95e6a9 loleaflet: remove pagepartrectangles request and handling in loleaflet
Change-Id: Ib83e7c0ca05a7d7d1a3d30675ef3cf5804f5ac4c
2017-02-05 21:59:22 -05:00
Ashod Nakashian
5dad626b6d wsd: remove handling of depricated partpagerectangles command
Change-Id: I13285e83179ab7654b6fd21a6548730e74d67425
2017-02-05 21:59:22 -05:00
Henry Castro
174154093b loleaflet: add annotations 2017-02-05 20:24:18 -04:00
Pranav Kant
53bdbce4c1 Disable these tiled comment rendering related tests
We have enabled LOK_FEATURE_NO_TILED_ANNOTATIONS flag already
in Kit.cpp, which means these tests, which assume comments are
rendered as tiles, are no longer relevant, so lets disable them
for now. Surely sometime in future they would completely be
removed and replaced by new tests that assume comments are *not*
rendered in tiles and rather are added/modified/removed by using
comments API. See LOK_CALLBACK_COMMENT for details.

Change-Id: I48b7a0a0aa116d164a3654618ab0e95252d29cf3
2017-02-04 22:33:35 +05:30
Ashod Nakashian
386dc679a5 wsd: get system thread-id directly as not in Poco yet
Change-Id: I49ba23b6cd50c2d9058e9803d7f65ec41277297b
Reviewed-on: https://gerrit.libreoffice.org/33890
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 16:01:52 +00:00
Samuel Mehrbrodt
1f2d04a5e4 Online, not on-line
Change-Id: I93a8322dceca7c1ed95449c6aeb4ae854b982957
Reviewed-on: https://gerrit.libreoffice.org/33886
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-02-03 13:47:30 +00:00
Ashod Nakashian
d7a9a76ddb wsd: report PSS of kit processes
Each Kit process now reports its own PSS,
which is much more accurate as they share
a significant ratio of their pages with
one another.

Admin tracks the PSS values of the Kits
and reports to the console.

Change-Id: Ifa66d17749c224f0dc211db80c44f7c913f2d6c4
Reviewed-on: https://gerrit.libreoffice.org/33864
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:12:31 +00:00
Ashod Nakashian
ae8c352928 wsd: access AdminModel instance under lock
Change-Id: I6c5c07dafa69f052ee81e7cbecb4d1f2b772fef9
Reviewed-on: https://gerrit.libreoffice.org/33863
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:08:58 +00:00
Ashod Nakashian
b9a7e1ef03 wsd: improved test and cosmetics
Change-Id: I25a0a27c12394f41af8e021b72627b1c0537a166
Reviewed-on: https://gerrit.libreoffice.org/33862
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:08:43 +00:00
Ashod Nakashian
cd4e8205cf wsd: add getTokenInteger to Message
Change-Id: I2c145aa088082ef056b92c9864b34d8cc2f737cd
Reviewed-on: https://gerrit.libreoffice.org/33861
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:08:16 +00:00
Ashod Nakashian
cd85d8a7f1 wsd: improved protocol helpers
Change-Id: I434fd9d6bb3248a8b9c27bb6c8565369c95786b5
Reviewed-on: https://gerrit.libreoffice.org/33860
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:07:38 +00:00
Ashod Nakashian
4eed11e2be wsd: Admin logging updated
Change-Id: I7d7e0f98f10ae3ef10ca15cf6ad510a3d7bab00e
Reviewed-on: https://gerrit.libreoffice.org/33859
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:06:06 +00:00
Ashod Nakashian
e325bc2978 wsd: ensure test doc is closed before reloading
This reduces the chance for random test failures.

Change-Id: I961a502d57a3cb4946b3b7febc6e6b03e7f36aa1
Reviewed-on: https://gerrit.libreoffice.org/33858
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:05:23 +00:00
Ashod Nakashian
c22e69e9e6 wsd: correct logging of thread ID in log entries
Change-Id: I10aaeeea8df2757362482a405b7525542d150178
Reviewed-on: https://gerrit.libreoffice.org/33857
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:05:06 +00:00
Ashod Nakashian
942aedb414 wsd: AdminModel logging update
Change-Id: Ia9225d4778b69f6417d4025876d7e9560918b05b
Reviewed-on: https://gerrit.libreoffice.org/33856
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:04:41 +00:00
László Németh
3616b4a6a8 wsd: fix snap support
- add loolwsd option --config-file=path

- search all data files in the actual data directory
  instead of the default one.

(cherry-picked from commit c4e9681fd17381c7af2936726262d7357a7dda10)

Change-Id: I028ff8a696aa6336da55bcac2952f13b12ba8eb8
Reviewed-on: https://gerrit.libreoffice.org/33504
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-02-01 14:24:48 +01:00
László Németh
57abb860f4 add alternative Poco library search path for loolforkit and loolmount
These executables are binaries with Linux capabilities, in which case
LD_LIBRARY_PATH is ignored. As a workaround, we can use rpath to support
the alternative Poco library path of a "classic" snap package.

(cherry-picked from commit 74bc911efbf4882f389a49c8e627e7e8057d4a4b)

Change-Id: I23c1d58cce64875abb9629943bfffd7ea633b2bc
Reviewed-on: https://gerrit.libreoffice.org/33705
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-02-01 14:23:51 +01:00
Andras Timar
1a926addc1 loleaflet: updated pot files 2017-01-30 15:41:24 +01:00
Ashod Nakashian
8519586674 wsd: manually generate the viewinfo json string
Change-Id: Ia1c1d8752fe134a43be2859db0eb8e87fe5d83f6
Reviewed-on: https://gerrit.libreoffice.org/33684
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 08:08:41 +00:00
Ashod Nakashian
7f15ef7ba0 wsd: minimize locking when generating viewinfo
Change-Id: I48b9465a3813aeabb0229c46f210771b82b1f8d1
Reviewed-on: https://gerrit.libreoffice.org/33683
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 08:07:04 +00:00
Ashod Nakashian
f33f014f98 wsd: simplify tracking of user info
Change-Id: Iac860c5c1862fa3bbb1b6dd39e827712eb34ed9a
Reviewed-on: https://gerrit.libreoffice.org/33682
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 08:06:31 +00:00
Ashod Nakashian
93858c5b9e wsd: forkit removes jails after reaping dead children
Change-Id: Ia4b8dd85b41fa59ececbed85e35616fee6a02254
Reviewed-on: https://gerrit.libreoffice.org/33678
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 05:11:07 +00:00
Ashod Nakashian
cc3285e923 wsd: log memory stat duration and averages
Change-Id: I8c84053c52c6725d2bda2e75313c52520e4bae6e
Reviewed-on: https://gerrit.libreoffice.org/33679
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 05:10:44 +00:00
Ashod Nakashian
0d4d506ea3 wsd: faster jail directory cleanup
Around 1.5x faster than Poco,
which first enumerates files into
a container, then iterates over
them and stats before unlinking.

Here we enumerate and unlink in
a single pass.

Change-Id: I79d1c0f1b5ec557ccc4f0e2ec7a0609051d8d212
Reviewed-on: https://gerrit.libreoffice.org/33680
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 05:10:09 +00:00
Ashod Nakashian
65be8a3e56 loleaflet: 50 docs or more is considered prod deployment
Change-Id: Ib36fdc43a7c94dc63ec9e31fe21eea475913c8d5
Reviewed-on: https://gerrit.libreoffice.org/33681
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 05:09:13 +00:00
Ashod Nakashian
016a85b643 wsd: allow testing higher MAX_DOCUMENTS and MAX_CONNECTIONS
Change-Id: I678af51871c2b145ce91c1646315a00ea1ac60fa
Reviewed-on: https://gerrit.libreoffice.org/33676
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:11:47 +00:00
Ashod Nakashian
c2d8e7bb4c wsd: unittest max views
Change-Id: I832e2d3e004001c271089382c5e1241b07572eb7
Reviewed-on: https://gerrit.libreoffice.org/33675
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:11:30 +00:00
Ashod Nakashian
1ba7c0209a wsd: cosmetics
Change-Id: I58a9e579e228d7b4a1e1b5686988aeff8da9922f
Reviewed-on: https://gerrit.libreoffice.org/33674
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:11:13 +00:00
Ashod Nakashian
292400eeed wsd: reuse the timer-based memory stats for admin requests
Change-Id: I3778458043174fb5489617d022445205daf91532
Reviewed-on: https://gerrit.libreoffice.org/33673
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:10:13 +00:00
Ashod Nakashian
9a8fe7054a wsd: more time to count lool processes
In unittests we need to count the
number of lool processes. This can
take a long time depending on how many
they are and if they are exiting or
new ones being created.

New logic is to reset the timeout
when the numbers are changing until
it settles on either the expected
(when we return), or some other value.

Change-Id: Ia8fcc7ef60586ebec6d8a280174b4dd2eae0ccc4
Reviewed-on: https://gerrit.libreoffice.org/33672
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:08:39 +00:00
Ashod Nakashian
78fdcb903a wsd: correct configuring MAX_DOCUMENTS
Change-Id: I14ffd990cdfb0206d93de01f42fc99efda4e6e8f
Reviewed-on: https://gerrit.libreoffice.org/33671
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:05:35 +00:00
Ashod Nakashian
4dc6b574a0 wsd: show a different limit message for non-dev builds
For now we assume configurations of more than 50
documents are not for dev or demo. This is because
loading 50 documents will require a reasonably
sized server and is beyond the default of 10.

Change-Id: I099206d7d35a88102c1834ea9015b85810a3f190
Reviewed-on: https://gerrit.libreoffice.org/33670
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:05:09 +00:00
Ashod Nakashian
2c77fe54d4 wsd: update LibreOffice Kit header
Change-Id: I792bcd6aa28de0d0916e3676b76ea87994cd685f
Reviewed-on: https://gerrit.libreoffice.org/33668
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:04:47 +00:00
Ashod Nakashian
e342c87dbf wsd: account for transient file connections
The connection limit MAX_CONNECTIONS
is for document WS connections, which
doesn't take into account the other
resources (.js, .css, etc.) that clients
request. These transient files are as
many as 10 per client. While they
are being requested, other clients
should not be blocked due to reaching
the limit.

We now take into account these connections
and allow at least half as many clients
as the limit to connect simultaneously
without blockage.

Change-Id: I42fd27b992457bcf765a7a85382e6d7caad4bc97
Reviewed-on: https://gerrit.libreoffice.org/33669
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:04:41 +00:00
Ashod Nakashian
3816b0c8eb wsd: faster and more informative tile tests
Change-Id: Ifcd179600ca1b019f43a86eaf0fd11a5d8a6177a
Reviewed-on: https://gerrit.libreoffice.org/33667
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:03:54 +00:00
Jan Holesovsky
da93cd416b Temporarily disable, these tests are affected by the order of invalidates.
Change-Id: Icd08629315417f3ca8f2c5560271a12c62309956
2017-01-27 19:17:42 +01:00
Pranav Kant
440ca8e2f7 Initial support for comments lok api
Change-Id: I1fc48e245a47f7b8d4260009d8c377c30d0b8820
2017-01-27 23:36:24 +05:30
Pranav Kant
8df085fbff .gitignore: Ignore TAGS file
Change-Id: I23a1de867ea623e0355688caab6fba5b3d5d2474
2017-01-27 23:25:57 +05:30
Jan Holesovsky
9d4eab1aba Re-introduce the TileQueue depth logging.
Change-Id: I025aa9745d1b0a3306930323764957c6d84a0966
2017-01-27 18:32:01 +01:00
Jan Holesovsky
545e2a2abe Fix a size check.
Change-Id: I509d12dcde6f56a2a7a9ee244e721d8028dec501
2017-01-26 11:49:29 +01:00
Jan Holesovsky
c44f7b8a76 Revert "loolwsd: improved MessageQueue"
Now we don't get a situation where there would be a tremendous amount of
invalidates & tile render requests piled in the queue, so we can do it
deterministic again.

The only thing that could potentially pile in the queue are the keypresses
events sent from the clients, but that is a different problem anyway.

This reverts commit c326228774.

Change-Id: I98e199eab0187bf5f47ce322ac1b1b2e3b976b85
2017-01-26 11:49:29 +01:00
Jan Holesovsky
3c9f4e1e1f Deduplicate & remove obsolete invalidations from the queue.
There's no point in trying to paint something we know will be obsolete anyway.

Change-Id: I14f61f389b114f2cda1f97e5223b31fa2f01b06c
2017-01-26 11:49:29 +01:00
Jan Holesovsky
f77253f4f8 Deduplicate the .uno: command state changes too.
Change-Id: Iaf9204d39d90cb9289d279e35a4609fa68c2cce8
2017-01-26 11:49:29 +01:00